OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 return host_->GetBounds().origin(); | 206 return host_->GetBounds().origin(); |
207 } | 207 } |
208 | 208 |
209 void RootWindow::SetCursor(gfx::NativeCursor cursor) { | 209 void RootWindow::SetCursor(gfx::NativeCursor cursor) { |
210 last_cursor_ = cursor; | 210 last_cursor_ = cursor; |
211 // A lot of code seems to depend on NULL cursors actually showing an arrow, | 211 // A lot of code seems to depend on NULL cursors actually showing an arrow, |
212 // so just pass everything along to the host. | 212 // so just pass everything along to the host. |
213 host_->SetCursor(cursor); | 213 host_->SetCursor(cursor); |
214 } | 214 } |
215 | 215 |
| 216 void RootWindow::SetHostWindowProperty(const std::string& name, int value) { |
| 217 host_->SetHostWindowProperty(name, value); |
| 218 } |
| 219 |
216 void RootWindow::OnCursorVisibilityChanged(bool show) { | 220 void RootWindow::OnCursorVisibilityChanged(bool show) { |
217 host_->OnCursorVisibilityChanged(show); | 221 host_->OnCursorVisibilityChanged(show); |
218 } | 222 } |
219 | 223 |
220 void RootWindow::OnMouseEventsEnableStateChanged(bool enabled) { | 224 void RootWindow::OnMouseEventsEnableStateChanged(bool enabled) { |
221 // Send entered / exited so that visual state can be updated to match | 225 // Send entered / exited so that visual state can be updated to match |
222 // mouse events state. | 226 // mouse events state. |
223 PostMouseMoveEventAfterWindowChange(); | 227 PostMouseMoveEventAfterWindowChange(); |
224 // TODO(mazda): Add code to disable mouse events when |enabled| == false. | 228 // TODO(mazda): Add code to disable mouse events when |enabled| == false. |
225 } | 229 } |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 ui::MouseEvent event(ui::ET_MOUSE_MOVED, | 1006 ui::MouseEvent event(ui::ET_MOUSE_MOVED, |
1003 orig_mouse_location, | 1007 orig_mouse_location, |
1004 orig_mouse_location, | 1008 orig_mouse_location, |
1005 ui::EF_IS_SYNTHESIZED); | 1009 ui::EF_IS_SYNTHESIZED); |
1006 event.set_system_location(Env::GetInstance()->last_mouse_location()); | 1010 event.set_system_location(Env::GetInstance()->last_mouse_location()); |
1007 OnHostMouseEvent(&event); | 1011 OnHostMouseEvent(&event); |
1008 #endif | 1012 #endif |
1009 } | 1013 } |
1010 | 1014 |
1011 } // namespace aura | 1015 } // namespace aura |
OLD | NEW |