Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: views/widget/root_view.cc

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/view.cc ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « views/view.cc ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698