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

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

Issue 8620008: Get rid of Widget::ConvertPointFromAncestor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « ui/views/widget/widget.h ('k') | views/view.h » ('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 "ui/views/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 bool Widget::SetInitialFocus() { 810 bool Widget::SetInitialFocus() {
811 if (!focus_on_creation_) 811 if (!focus_on_creation_)
812 return true; 812 return true;
813 View* v = widget_delegate_->GetInitiallyFocusedView(); 813 View* v = widget_delegate_->GetInitiallyFocusedView();
814 if (v) 814 if (v)
815 v->RequestFocus(); 815 v->RequestFocus();
816 return !!v; 816 return !!v;
817 } 817 }
818 818
819 bool Widget::ConvertPointFromAncestor(
820 const Widget* ancestor, gfx::Point* point) const {
821 return native_widget_->ConvertPointFromAncestor(ancestor, point);
822 }
823
824 View* Widget::GetChildViewParent() { 819 View* Widget::GetChildViewParent() {
825 return GetContentsView() ? GetContentsView() : GetRootView(); 820 return GetContentsView() ? GetContentsView() : GetRootView();
826 } 821 }
827 822
828 gfx::Rect Widget::GetWorkAreaBoundsInScreen() const { 823 gfx::Rect Widget::GetWorkAreaBoundsInScreen() const {
829 return native_widget_->GetWorkAreaBoundsInScreen(); 824 return native_widget_->GetWorkAreaBoundsInScreen();
830 } 825 }
831 826
832 //////////////////////////////////////////////////////////////////////////////// 827 ////////////////////////////////////////////////////////////////////////////////
833 // Widget, NativeWidgetDelegate implementation: 828 // Widget, NativeWidgetDelegate implementation:
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 1198
1204 //////////////////////////////////////////////////////////////////////////////// 1199 ////////////////////////////////////////////////////////////////////////////////
1205 // internal::NativeWidgetPrivate, NativeWidget implementation: 1200 // internal::NativeWidgetPrivate, NativeWidget implementation:
1206 1201
1207 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1202 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1208 return this; 1203 return this;
1209 } 1204 }
1210 1205
1211 } // namespace internal 1206 } // namespace internal
1212 } // namespace views 1207 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698