| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |