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

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

Issue 160474: Status bubble limping in TOOLKIT_VIEWS.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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/widget/root_view.cc ('k') | views/widget/widget_gtk.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 VIEWS_WIDGET_WIDGET_H_ 5 #ifndef VIEWS_WIDGET_WIDGET_H_
6 #define VIEWS_WIDGET_WIDGET_H_ 6 #define VIEWS_WIDGET_WIDGET_H_
7 7
8 #include "base/gfx/native_widget_types.h" 8 #include "base/gfx/native_widget_types.h"
9 9
10 class ThemeProvider; 10 class ThemeProvider;
(...skipping 25 matching lines...) Expand all
36 // 36 //
37 // The Widget is responsible for handling various system events and forwarding 37 // The Widget is responsible for handling various system events and forwarding
38 // them to the appropriate view. 38 // them to the appropriate view.
39 // 39 //
40 ///////////////////////////////////////////////////////////////////////////// 40 /////////////////////////////////////////////////////////////////////////////
41 41
42 class Widget { 42 class Widget {
43 public: 43 public:
44 virtual ~Widget() { } 44 virtual ~Widget() { }
45 45
46 // Creates a transparent popup widget specific to the current platform useful
47 // for transient status notifications.
48 static Widget* CreateTransparentPopupWidget(bool delete_on_destroy);
49
50 // Initialize the Widget with a parent and an initial desired size.
51 // |contents_view| is the view that will be the single child of RootView
52 // within this Widget. As contents_view is inserted into RootView's tree,
53 // RootView assumes ownership of this view and cleaning it up. If you remove
54 // this view, you are responsible for its destruction. If this value is NULL,
55 // the caller is responsible for populating the RootView, and sizing its
56 // contents as the window is sized.
57 virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds) = 0;
58
59 // Sets the specified view as the contents of this Widget. There can only
60 // be one contnets view child of this Widget's RootView. This view is sized to
61 // fit the entire size of the RootView. The RootView takes ownership of this
62 // View, unless it is set as not being parent-owned.
63 virtual void SetContentsView(View* view) = 0;
64
46 // Returns the bounds of this Widget in the screen coordinate system. 65 // Returns the bounds of this Widget in the screen coordinate system.
47 // If the receiving Widget is a frame which is larger than its client area, 66 // If the receiving Widget is a frame which is larger than its client area,
48 // this method returns the client area if including_frame is false and the 67 // this method returns the client area if including_frame is false and the
49 // frame bounds otherwise. If the receiving Widget is not a frame, 68 // frame bounds otherwise. If the receiving Widget is not a frame,
50 // including_frame is ignored. 69 // including_frame is ignored.
51 virtual void GetBounds(gfx::Rect* out, bool including_frame) const = 0; 70 virtual void GetBounds(gfx::Rect* out, bool including_frame) const = 0;
52 71
53 // Sizes and/or places the widget to the specified bounds, size or position. 72 // Sizes and/or places the widget to the specified bounds, size or position.
54 virtual void SetBounds(const gfx::Rect& bounds) = 0; 73 virtual void SetBounds(const gfx::Rect& bounds) = 0;
55 74
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; } 141 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; }
123 142
124 // Returns the FocusManager for this widget. 143 // Returns the FocusManager for this widget.
125 // Note that all widgets in a widget hierarchy share the same focus manager. 144 // Note that all widgets in a widget hierarchy share the same focus manager.
126 virtual FocusManager* GetFocusManager() { return NULL; } 145 virtual FocusManager* GetFocusManager() { return NULL; }
127 }; 146 };
128 147
129 } // namespace views 148 } // namespace views
130 149
131 #endif // VIEWS_WIDGET_WIDGET_H_ 150 #endif // VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « views/widget/root_view.cc ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698