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

Unified Diff: views/widget/widget.h

Issue 307030: New widget factories & methods to support desktop notifications, GTK stubs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: views/widget/widget.h
===================================================================
--- views/widget/widget.h (revision 29817)
+++ views/widget/widget.h (working copy)
@@ -43,10 +43,26 @@
public:
virtual ~Widget() { }
- // Creates a transparent popup widget specific to the current platform useful
- // for transient status notifications.
- static Widget* CreateTransparentPopupWidget(bool delete_on_destroy);
+ enum TransparencyParam {
+ Transparent,
+ NotTransparent
+ };
+ enum EventsParam {
+ AcceptEvents,
+ NotAcceptEvents
+ };
+
+ enum DeleteParam {
+ DeleteOnDestroy,
+ NotDeleteOnDestroy
+ };
+
+ // Creates a transient popup widget specific to the current platform.
+ static Widget* CreatePopupWidget(TransparencyParam transparent,
+ EventsParam accept_events,
+ DeleteParam delete_on_destroy);
+
// Initialize the Widget with a parent and an initial desired size.
// |contents_view| is the view that will be the single child of RootView
// within this Widget. As contents_view is inserted into RootView's tree,
@@ -57,7 +73,7 @@
virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds) = 0;
// Sets the specified view as the contents of this Widget. There can only
- // be one contnets view child of this Widget's RootView. This view is sized to
+ // be one contents view child of this Widget's RootView. This view is sized to
// fit the entire size of the RootView. The RootView takes ownership of this
// View, unless it is set as not being parent-owned.
virtual void SetContentsView(View* view) = 0;
@@ -72,6 +88,9 @@
// Sizes and/or places the widget to the specified bounds, size or position.
virtual void SetBounds(const gfx::Rect& bounds) = 0;
+ // Places the widget in front of the specified widget in z-order.
+ virtual void MoveAbove(Widget* widget) = 0;
+
// Sets a shape on the widget.
virtual void SetShape(const gfx::Path& shape) = 0;
@@ -99,6 +118,9 @@
// repaint to allow this change to take effect.
virtual void SetOpacity(unsigned char opacity) = 0;
+ // Sets the widget to be on top of all other widgets in the windowing system.
+ virtual void SetAlwaysOnTop(bool on_top) = 0;
+
// Returns the RootView contained by this Widget.
virtual RootView* GetRootView() = 0;

Powered by Google App Engine
This is Rietveld 408576698