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

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

Issue 8620008: Get rid of Widget::ConvertPointFromAncestor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/native_widget_win.cc ('k') | ui/views/widget/widget.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 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // Sets-up the focus manager with the view that should have focus when the 543 // Sets-up the focus manager with the view that should have focus when the
544 // window is shown the first time. Returns true if the initial focus has been 544 // window is shown the first time. Returns true if the initial focus has been
545 // set or the widget should not set the initial focus, or false if the caller 545 // set or the widget should not set the initial focus, or false if the caller
546 // should set the initial focus (if any). 546 // should set the initial focus (if any).
547 bool SetInitialFocus(); 547 bool SetInitialFocus();
548 548
549 void set_focus_on_creation(bool focus_on_creation) { 549 void set_focus_on_creation(bool focus_on_creation) {
550 focus_on_creation_ = focus_on_creation; 550 focus_on_creation_ = focus_on_creation;
551 } 551 }
552 552
553 // Converts the |point| in ancestor's coordinate to this widget's coordinates.
554 // Returns false if |ancestor| is not an ancestor of this widget.
555 // The receiver has to be pure views widget (NativeWidgetViews) and
556 // ancestor can be of any type.
557 bool ConvertPointFromAncestor(
558 const Widget* ancestor, gfx::Point* point) const;
559
560 // Returns a View* that any child Widgets backed by NativeWidgetViews 553 // Returns a View* that any child Widgets backed by NativeWidgetViews
561 // are added to. The default implementation returns the contents view 554 // are added to. The default implementation returns the contents view
562 // if it exists and the root view otherwise. 555 // if it exists and the root view otherwise.
563 virtual View* GetChildViewParent(); 556 virtual View* GetChildViewParent();
564 557
565 // True if the widget is considered top level widget. Top level widget 558 // True if the widget is considered top level widget. Top level widget
566 // is a widget of TYPE_WINDOW, TYPE_WINDOW_FRAMELESS, BUBBLE, POPUP or MENU, 559 // is a widget of TYPE_WINDOW, TYPE_WINDOW_FRAMELESS, BUBBLE, POPUP or MENU,
567 // and has a focus manager and input method object associated with it. 560 // and has a focus manager and input method object associated with it.
568 // TYPE_CONTROL and TYPE_TOOLTIP is not considered top level. 561 // TYPE_CONTROL and TYPE_TOOLTIP is not considered top level.
569 bool is_top_level() const { return is_top_level_; } 562 bool is_top_level() const { return is_top_level_; }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // duplicate move events even though the mouse hasn't moved. 726 // duplicate move events even though the mouse hasn't moved.
734 bool last_mouse_event_was_move_; 727 bool last_mouse_event_was_move_;
735 gfx::Point last_mouse_event_position_; 728 gfx::Point last_mouse_event_position_;
736 729
737 DISALLOW_COPY_AND_ASSIGN(Widget); 730 DISALLOW_COPY_AND_ASSIGN(Widget);
738 }; 731 };
739 732
740 } // namespace views 733 } // namespace views
741 734
742 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 735 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698