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 "ash/host/ash_window_tree_host.h" | 5 #include "ash/host/ash_window_tree_host.h" |
6 | 6 |
7 #include "ash/host/ash_window_tree_host_init_params.h" | 7 #include "ash/host/ash_window_tree_host_init_params.h" |
8 #include "ash/host/ash_window_tree_host_unified.h" | 8 #include "ash/host/ash_window_tree_host_unified.h" |
9 #include "ash/shell_port.h" | 9 #include "ash/shell_port.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "ui/aura/client/screen_position_client.h" | 11 #include "ui/aura/client/screen_position_client.h" |
12 #include "ui/aura/window_tree_host.h" | 12 #include "ui/aura/window_tree_host.h" |
13 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
14 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
15 | 15 |
16 #if defined(USE_OZONE) | 16 #if defined(USE_OZONE) |
17 #include "ash/host/ash_window_tree_host_platform.h" | 17 #include "ash/host/ash_window_tree_host_platform.h" |
18 #elif defined(USE_X11) | 18 #elif defined(USE_X11) |
19 #include "ash/host/ash_window_tree_host_x11.h" | 19 #include "ash/host/ash_window_tree_host_x11.h" |
20 #endif | 20 #endif |
21 | 21 |
22 namespace ash { | 22 namespace ash { |
23 | 23 |
24 AshWindowTreeHost::AshWindowTreeHost() : input_method_handler_(nullptr) {} | 24 AshWindowTreeHost::AshWindowTreeHost() {} |
25 | 25 |
26 AshWindowTreeHost::~AshWindowTreeHost() = default; | 26 AshWindowTreeHost::~AshWindowTreeHost() = default; |
27 | 27 |
28 void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) { | 28 void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) { |
29 if (event->IsTouchEvent()) | 29 if (event->IsTouchEvent()) |
30 return; | 30 return; |
31 | 31 |
32 aura::WindowTreeHost* wth = AsWindowTreeHost(); | 32 aura::WindowTreeHost* wth = AsWindowTreeHost(); |
33 aura::Window* root_window = wth->window(); | 33 aura::Window* root_window = wth->window(); |
34 aura::client::ScreenPositionClient* screen_position_client = | 34 aura::client::ScreenPositionClient* screen_position_client = |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return base::MakeUnique<AshWindowTreeHostPlatform>( | 66 return base::MakeUnique<AshWindowTreeHostPlatform>( |
67 init_params.initial_bounds); | 67 init_params.initial_bounds); |
68 #elif defined(USE_X11) | 68 #elif defined(USE_X11) |
69 return base::MakeUnique<AshWindowTreeHostX11>(init_params.initial_bounds); | 69 return base::MakeUnique<AshWindowTreeHostX11>(init_params.initial_bounds); |
70 #else | 70 #else |
71 #error Unsupported platform. | 71 #error Unsupported platform. |
72 #endif | 72 #endif |
73 } | 73 } |
74 | 74 |
75 } // namespace ash | 75 } // namespace ash |
OLD | NEW |