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 "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "ui/aura/client/screen_position_client.h" | 10 #include "ui/aura/client/screen_position_client.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace ash { | 23 namespace ash { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 base::LazyInstance<AshWindowTreeHost::Factory> creation_factory = | 27 base::LazyInstance<AshWindowTreeHost::Factory> creation_factory = |
28 LAZY_INSTANCE_INITIALIZER; | 28 LAZY_INSTANCE_INITIALIZER; |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 AshWindowTreeHost::AshWindowTreeHost() : input_method_handler_(nullptr) { | 32 AshWindowTreeHost::AshWindowTreeHost() : input_method_handler_(nullptr) {} |
33 } | |
34 | 33 |
35 void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) { | 34 void AshWindowTreeHost::TranslateLocatedEvent(ui::LocatedEvent* event) { |
36 if (event->IsTouchEvent()) | 35 if (event->IsTouchEvent()) |
37 return; | 36 return; |
38 | 37 |
39 aura::WindowTreeHost* wth = AsWindowTreeHost(); | 38 aura::WindowTreeHost* wth = AsWindowTreeHost(); |
40 aura::Window* root_window = wth->window(); | 39 aura::Window* root_window = wth->window(); |
41 aura::client::ScreenPositionClient* screen_position_client = | 40 aura::client::ScreenPositionClient* screen_position_client = |
42 aura::client::GetScreenPositionClient(root_window); | 41 aura::client::GetScreenPositionClient(root_window); |
43 gfx::Rect local(wth->GetBounds().size()); | 42 gfx::Rect local(wth->GetBounds().size()); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #error Unsupported platform. | 74 #error Unsupported platform. |
76 #endif | 75 #endif |
77 } | 76 } |
78 | 77 |
79 // static | 78 // static |
80 void AshWindowTreeHost::SetFactory(const Factory& factory) { | 79 void AshWindowTreeHost::SetFactory(const Factory& factory) { |
81 creation_factory.Get() = factory; | 80 creation_factory.Get() = factory; |
82 } | 81 } |
83 | 82 |
84 } // namespace ash | 83 } // namespace ash |
OLD | NEW |