summaryrefslogtreecommitdiffstats
path: root/views/widget/widget.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 23:42:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 23:42:23 +0000
commit6479c267dd32aab3f043aa2d3b2f808505c031ef (patch)
treeb4c1f5aa25fb119ed28338626e947a7f296a02e3 /views/widget/widget.h
parentb44f5db5391f9865d5950fe88f77dd80e7661ab2 (diff)
downloadchromium_src-6479c267dd32aab3f043aa2d3b2f808505c031ef.zip
chromium_src-6479c267dd32aab3f043aa2d3b2f808505c031ef.tar.gz
chromium_src-6479c267dd32aab3f043aa2d3b2f808505c031ef.tar.bz2
Removes WidgetWin dependency from StatusBubbleViews so that it can compile on Linux.
Requires: - making SetOpacity a cross platform method on Widget, replacing SetLayeredAlpha. - moving Window::SetBounds to Widget - replacing usage of MoveWindow in StatusBubbleViews with call to new SetBounds method. BUG=none TEST=make sure transparency still works for floating widgets like - status bubble, full screen exit bubble, dragged tabs Review URL: http://codereview.chromium.org/113846 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget.h')
-rw-r--r--views/widget/widget.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h
index b2c3551..efa16c5 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -46,12 +46,33 @@ class Widget {
// including_frame is ignored.
virtual void GetBounds(gfx::Rect* out, bool including_frame) const = 0;
+ // Sizes and/or places the widget to the specified bounds, size or position.
+ virtual void SetBounds(const gfx::Rect& bounds) = 0;
+
+ // Hides the widget then closes it after a return to the message loop.
+ virtual void Close() = 0;
+
+ // Closes the widget immediately. Compare to |Close|. This will destroy the
+ // window handle associated with this Widget, so should not be called from
+ // any code that expects it to be valid beyond this call.
+ virtual void CloseNow() = 0;
+
+ // Shows or hides the widget, without changing activation state.
+ virtual void Show() = 0;
+ virtual void Hide() = 0;
+
// Returns the gfx::NativeView associated with this Widget.
virtual gfx::NativeView GetNativeView() const = 0;
// Forces a paint of a specified rectangle immediately.
virtual void PaintNow(const gfx::Rect& update_rect) = 0;
+ // Sets the opacity of the widget. This may allow widgets behind the widget
+ // in the Z-order to become visible, depending on the capabilities of the
+ // underlying windowing system. Note that the caller must then schedule a
+ // repaint to allow this change to take effect.
+ virtual void SetOpacity(unsigned char opacity) = 0;
+
// Returns the RootView contained by this Widget.
virtual RootView* GetRootView() = 0;