diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
commit | a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (patch) | |
tree | d8283a980977f11c43542016d57f698d3a83b73d /chrome/views/root_view.h | |
parent | 933cc00eb856db684b9e64b7486ca20edbb2c3ea (diff) | |
download | chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.zip chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.gz chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.bz2 |
Rename Container->Widget
R=erg
review url = http://codereview.chromium.org/11348/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/root_view.h')
-rw-r--r-- | chrome/views/root_view.h | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/chrome/views/root_view.h b/chrome/views/root_view.h index d15d354..6c62ba8 100644 --- a/chrome/views/root_view.h +++ b/chrome/views/root_view.h @@ -11,9 +11,9 @@ namespace views { -class Container; class PaintTask; class RootViewDropTarget; +class Widget; //////////////////////////////////////////////////////////////////////////////// // @@ -30,13 +30,12 @@ class FocusListener { // // RootView class // -// The RootView is the root of a View hierarchy. Its parent is not -// necessarily a Container, but the Container's View child is always a -// RootView. +// The RootView is the root of a View hierarchy. A RootView is always the +// first and only child of a Widget. // -// The RootView manages the View hierarchy's interface with the -// Container, and also maintains the current invalid rect - the region -// that needs repainting. +// The RootView manages the View hierarchy's interface with the Widget +// and also maintains the current invalid rect - the region that needs +// repainting. // ///////////////////////////////////////////////////////////////////////////// class RootView : public View, @@ -44,7 +43,7 @@ class RootView : public View, public: static const char kViewClassName[]; - explicit RootView(Container* container); + explicit RootView(Widget* widget); virtual ~RootView(); @@ -71,8 +70,7 @@ class RootView : public View, // returns whether this root view needs to paint as soon as possible. virtual bool NeedsPainting(bool urgent); - // Invoked by the Container to discover what rectangle should be - // painted + // Invoked by the Widget to discover what rectangle should be painted. const gfx::Rect& GetScheduledPaintRect(); // Returns the region scheduled to paint clipped to the RootViews bounds. @@ -80,8 +78,8 @@ class RootView : public View, // Tree functions - // Get the Container that hosts this View. - virtual Container* GetContainer() const; + // Get the Widget that hosts this View. + virtual Widget* GetWidget() const; // The following event methods are overridden to propagate event to the // control tree @@ -91,24 +89,23 @@ class RootView : public View, virtual void OnMouseMoved(const MouseEvent& e); virtual void SetMouseHandler(View* new_mouse_handler); - // Invoked when the Containers has been fully initialized. - // At the time the constructor is invoked the Container may not be - // completely initialized, when this method is invoked, it is. - void OnContainerCreated(); + // Invoked when the Widget has been fully initialized. + // At the time the constructor is invoked the Widget may not be completely + // initialized, when this method is invoked, it is. + void OnWidgetCreated(); - // Invoked prior to the Container being destroyed. - void OnContainerDestroyed(); + // Invoked prior to the Widget being destroyed. + void OnWidgetDestroyed(); - // Invoked By the Container if the mouse drag is interrupted by + // Invoked By the Widget if the mouse drag is interrupted by // the system. Invokes OnMouseReleased with a value of true for canceled. void ProcessMouseDragCanceled(); - // Invoked by the Container instance when the mouse moves outside of - // the container bounds + // Invoked by the Widget instance when the mouse moves outside of the Widget + // bounds. virtual void ProcessOnMouseExited(); - // Make the provided view focused. Also make sure that our container - // is focused. + // Make the provided view focused. Also make sure that our Widget is focused. void FocusView(View* view); // Check whether the provided view is in the focus path. The focus path is the @@ -167,10 +164,10 @@ class RootView : public View, virtual std::string GetClassName() const; // Clears the region that is schedule to be painted. You nearly never need - // to invoke this. This is primarily intended for Containers. + // to invoke this. This is primarily intended for Widgets. void ClearPaintRect(); - // Invoked from the Container to service a WM_PAINT call. + // Invoked from the Widget to service a WM_PAINT call. void OnPaint(HWND hwnd); // Returns the MSAA role of the current view. The role is what assistive @@ -202,7 +199,7 @@ class RootView : public View, DISALLOW_EVIL_CONSTRUCTORS(RootView); // Convert a point to our current mouse handler. Returns false if the - // mouse handler is not connected to a Container. In that case, the + // mouse handler is not connected to a Widget. In that case, the // conversion cannot take place and *p is unchanged bool ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point *p); @@ -267,8 +264,8 @@ class RootView : public View, // The view currently handling enter / exit View* mouse_move_handler_; - // The host Container - Container* container_; + // The host Widget + Widget* widget_; // The rectangle that should be painted gfx::Rect invalid_rect_; |