| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 const Widget* RootView::GetWidget() const { | 143 const Widget* RootView::GetWidget() const { |
| 144 return widget_; | 144 return widget_; |
| 145 } | 145 } |
| 146 | 146 |
| 147 Widget* RootView::GetWidget() { | 147 Widget* RootView::GetWidget() { |
| 148 return const_cast<Widget*>(const_cast<const RootView*>(this)->GetWidget()); | 148 return const_cast<Widget*>(const_cast<const RootView*>(this)->GetWidget()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool RootView::IsVisibleInRootView() const { | 151 bool RootView::IsVisibleInRootView() const { |
| 152 return IsVisible(); | 152 return visible(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 std::string RootView::GetClassName() const { | 155 std::string RootView::GetClassName() const { |
| 156 return kViewClassName; | 156 return kViewClassName; |
| 157 } | 157 } |
| 158 | 158 |
| 159 void RootView::SchedulePaintInRect(const gfx::Rect& rect) { | 159 void RootView::SchedulePaintInRect(const gfx::Rect& rect) { |
| 160 gfx::Rect xrect = ConvertRectToParent(rect); | 160 gfx::Rect xrect = ConvertRectToParent(rect); |
| 161 gfx::Rect invalid_rect = GetLocalBounds().Intersect(xrect); | 161 gfx::Rect invalid_rect = GetLocalBounds().Intersect(xrect); |
| 162 if (!invalid_rect.IsEmpty()) | 162 if (!invalid_rect.IsEmpty()) |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 465 |
| 466 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { | 466 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { |
| 467 last_mouse_event_flags_ = event.flags(); | 467 last_mouse_event_flags_ = event.flags(); |
| 468 last_mouse_event_x_ = event.x(); | 468 last_mouse_event_x_ = event.x(); |
| 469 last_mouse_event_y_ = event.y(); | 469 last_mouse_event_y_ = event.y(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace internal | 472 } // namespace internal |
| 473 } // namespace views | 473 } // namespace views |
| 474 | 474 |
| OLD | NEW |