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

Side by Side Diff: ash/host/ash_window_tree_host_unified.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698