| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 last_mouse_location_ = host_->QueryMouseLocation(); | 108 last_mouse_location_ = host_->QueryMouseLocation(); |
| 109 synthesize_mouse_move_ = false; | 109 synthesize_mouse_move_ = false; |
| 110 } | 110 } |
| 111 | 111 |
| 112 gfx::Size RootWindow::GetHostSize() const { | 112 gfx::Size RootWindow::GetHostSize() const { |
| 113 gfx::Rect rect(host_->GetSize()); | 113 gfx::Rect rect(host_->GetSize()); |
| 114 layer()->transform().TransformRect(&rect); | 114 layer()->transform().TransformRect(&rect); |
| 115 return rect.size(); | 115 return rect.size(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void RootWindow::SetScreenWorkAreaInsets(const gfx::Insets& insets) { |
| 119 if (screen_->work_area_insets() == insets) |
| 120 return; |
| 121 screen_->set_work_area_insets(insets); |
| 122 FOR_EACH_OBSERVER(RootWindowObserver, observers_, |
| 123 OnScreenWorkAreaInsetsChanged()); |
| 124 } |
| 125 |
| 118 void RootWindow::SetCursor(gfx::NativeCursor cursor) { | 126 void RootWindow::SetCursor(gfx::NativeCursor cursor) { |
| 119 last_cursor_ = cursor; | 127 last_cursor_ = cursor; |
| 120 // A lot of code seems to depend on NULL cursors actually showing an arrow, | 128 // A lot of code seems to depend on NULL cursors actually showing an arrow, |
| 121 // so just pass everything along to the host. | 129 // so just pass everything along to the host. |
| 122 host_->SetCursor(cursor); | 130 host_->SetCursor(cursor); |
| 123 } | 131 } |
| 124 | 132 |
| 125 void RootWindow::ShowCursor(bool show) { | 133 void RootWindow::ShowCursor(bool show) { |
| 126 cursor_shown_ = show; | 134 cursor_shown_ = show; |
| 127 host_->ShowCursor(show); | 135 host_->ShowCursor(show); |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 // is currently broken. See/ crbug.com/107931. | 839 // is currently broken. See/ crbug.com/107931. |
| 832 MouseEvent event(ui::ET_MOUSE_MOVED, | 840 MouseEvent event(ui::ET_MOUSE_MOVED, |
| 833 orig_mouse_location, | 841 orig_mouse_location, |
| 834 orig_mouse_location, | 842 orig_mouse_location, |
| 835 ui::EF_IS_SYNTHESIZED); | 843 ui::EF_IS_SYNTHESIZED); |
| 836 DispatchMouseEvent(&event); | 844 DispatchMouseEvent(&event); |
| 837 #endif | 845 #endif |
| 838 } | 846 } |
| 839 | 847 |
| 840 } // namespace aura | 848 } // namespace aura |
| OLD | NEW |