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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 191153004: Provide access to the WindowEventDispatcher as a ui::EventProcessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "ui/aura/client/capture_client.h" 8 #include "ui/aura/client/capture_client.h"
9 #include "ui/aura/client/cursor_client.h" 9 #include "ui/aura/client/cursor_client.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) { 120 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) {
121 observers_.AddObserver(observer); 121 observers_.AddObserver(observer);
122 } 122 }
123 123
124 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) { 124 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) {
125 observers_.RemoveObserver(observer); 125 observers_.RemoveObserver(observer);
126 } 126 }
127 127
128 ui::EventProcessor* WindowTreeHost::event_processor() {
129 return dispatcher();
130 }
131
128 void WindowTreeHost::SetRootWindowTransformer( 132 void WindowTreeHost::SetRootWindowTransformer(
129 scoped_ptr<RootWindowTransformer> transformer) { 133 scoped_ptr<RootWindowTransformer> transformer) {
130 transformer_ = transformer.Pass(); 134 transformer_ = transformer.Pass();
131 SetInsets(transformer_->GetHostInsets()); 135 SetInsets(transformer_->GetHostInsets());
132 window()->SetTransform(transformer_->GetTransform()); 136 window()->SetTransform(transformer_->GetTransform());
133 // If the layer is not animating, then we need to update the root window 137 // If the layer is not animating, then we need to update the root window
134 // size immediately. 138 // size immediately.
135 if (!window()->layer()->GetAnimator()->is_animating()) 139 if (!window()->layer()->GetAnimator()->is_animating())
136 UpdateRootWindowSize(GetBounds().size()); 140 UpdateRootWindowSize(GetBounds().size());
137 } 141 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 client::CursorClient* cursor_client = client::GetCursorClient(window()); 314 client::CursorClient* cursor_client = client::GetCursorClient(window());
311 if (cursor_client) { 315 if (cursor_client) {
312 const gfx::Display& display = 316 const gfx::Display& display =
313 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 317 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window());
314 cursor_client->SetDisplay(display); 318 cursor_client->SetDisplay(display);
315 } 319 }
316 dispatcher()->OnCursorMovedToRootLocation(root_location); 320 dispatcher()->OnCursorMovedToRootLocation(root_location);
317 } 321 }
318 322
319 } // namespace aura 323 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698