OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_unified.h" | 5 #include "ash/host/ash_window_tree_host_unified.h" |
6 #include "ash/host/root_window_transformer.h" | 6 #include "ash/host/root_window_transformer.h" |
7 #include "ash/ime/input_method_event_handler.h" | 7 #include "ash/ime/input_method_event_handler.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/aura/window_event_dispatcher.h" | 10 #include "ui/aura/window_event_dispatcher.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 aura::Window* src_root_; | 41 aura::Window* src_root_; |
42 aura::Window* dst_root_; | 42 aura::Window* dst_root_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(UnifiedEventTargeter); | 44 DISALLOW_COPY_AND_ASSIGN(UnifiedEventTargeter); |
45 }; | 45 }; |
46 | 46 |
47 AshWindowTreeHostUnified::AshWindowTreeHostUnified( | 47 AshWindowTreeHostUnified::AshWindowTreeHostUnified( |
48 const gfx::Rect& initial_bounds) | 48 const gfx::Rect& initial_bounds) |
49 : bounds_(gfx::Rect(initial_bounds.size())), transformer_helper_(this) { | 49 : bounds_(gfx::Rect(initial_bounds.size())), transformer_helper_(this) { |
50 CreateCompositor(GetAcceleratedWidget()); | 50 CreateCompositor(); |
| 51 OnAcceleratedWidgetAvailable(); |
51 transformer_helper_.Init(); | 52 transformer_helper_.Init(); |
52 } | 53 } |
53 | 54 |
54 AshWindowTreeHostUnified::~AshWindowTreeHostUnified() { | 55 AshWindowTreeHostUnified::~AshWindowTreeHostUnified() { |
55 for (auto* ash_host : mirroring_hosts_) | 56 for (auto* ash_host : mirroring_hosts_) |
56 ash_host->AsWindowTreeHost()->window()->RemoveObserver(this); | 57 ash_host->AsWindowTreeHost()->window()->RemoveObserver(this); |
57 | 58 |
58 DestroyCompositor(); | 59 DestroyCompositor(); |
59 DestroyDispatcher(); | 60 DestroyDispatcher(); |
60 } | 61 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 ui::KeyEvent* event) { | 182 ui::KeyEvent* event) { |
182 input_method_handler()->SetPostIME(true); | 183 input_method_handler()->SetPostIME(true); |
183 ui::EventDispatchDetails details = | 184 ui::EventDispatchDetails details = |
184 event_processor()->OnEventFromSource(event); | 185 event_processor()->OnEventFromSource(event); |
185 if (!details.dispatcher_destroyed) | 186 if (!details.dispatcher_destroyed) |
186 input_method_handler()->SetPostIME(false); | 187 input_method_handler()->SetPostIME(false); |
187 return details; | 188 return details; |
188 } | 189 } |
189 | 190 |
190 } // namespace ash | 191 } // namespace ash |
OLD | NEW |