OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |