Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 const gfx::Point host_location = 155 const gfx::Point host_location =
156 gfx::ConvertPointToDIP(display.device_scale_factor(), event->location()); 156 gfx::ConvertPointToDIP(display.device_scale_factor(), event->location());
157 event->set_location(host_location); 157 event->set_location(host_location);
158 const gfx::Point root_location = gfx::ConvertPointToDIP( 158 const gfx::Point root_location = gfx::ConvertPointToDIP(
159 display.device_scale_factor(), event->root_location()); 159 display.device_scale_factor(), event->root_location());
160 event->set_root_location(root_location); 160 event->set_root_location(root_location);
161 } 161 }
162 162
163 // Set the |target| to be the target window of this |event| and send it to 163 // Set the |target| to be the target window of this |event| and send it to
164 // the EventProcessor. 164 // the EventSink.
165 void DispatchEventToTarget(ui::Event* event, WindowMus* target) { 165 void DispatchEventToTarget(ui::Event* event, WindowMus* target) {
166 ui::Event::DispatcherApi dispatch_helper(event); 166 ui::Event::DispatcherApi dispatch_helper(event);
167 dispatch_helper.set_target(target->GetWindow()); 167 dispatch_helper.set_target(target->GetWindow());
168 GetWindowTreeHostMus(target)->SendEventToProcessor(event); 168 GetWindowTreeHostMus(target)->SendEventToSink(event);
169 } 169 }
170 170
171 } // namespace 171 } // namespace
172 172
173 WindowTreeClient::WindowTreeClient( 173 WindowTreeClient::WindowTreeClient(
174 service_manager::Connector* connector, 174 service_manager::Connector* connector,
175 WindowTreeClientDelegate* delegate, 175 WindowTreeClientDelegate* delegate,
176 WindowManagerDelegate* window_manager_delegate, 176 WindowManagerDelegate* window_manager_delegate,
177 mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request, 177 mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request,
178 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 178 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1869 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1870 this, capture_synchronizer_.get(), window)); 1870 this, capture_synchronizer_.get(), window));
1871 } 1871 }
1872 1872
1873 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1873 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1874 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1874 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1875 this, focus_synchronizer_.get(), window)); 1875 this, focus_synchronizer_.get(), window));
1876 } 1876 }
1877 1877
1878 } // namespace aura 1878 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698