| 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::SetHostWindowIntProperty(const std::string& name, int value) { |
| 217 host_->SetIntProperty(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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 ui::MouseEvent event(ui::ET_MOUSE_MOVED, | 1011 ui::MouseEvent event(ui::ET_MOUSE_MOVED, |
| 1008 orig_mouse_location, | 1012 orig_mouse_location, |
| 1009 orig_mouse_location, | 1013 orig_mouse_location, |
| 1010 ui::EF_IS_SYNTHESIZED); | 1014 ui::EF_IS_SYNTHESIZED); |
| 1011 event.set_system_location(Env::GetInstance()->last_mouse_location()); | 1015 event.set_system_location(Env::GetInstance()->last_mouse_location()); |
| 1012 OnHostMouseEvent(&event); | 1016 OnHostMouseEvent(&event); |
| 1013 #endif | 1017 #endif |
| 1014 } | 1018 } |
| 1015 | 1019 |
| 1016 } // namespace aura | 1020 } // namespace aura |
| OLD | NEW |