summaryrefslogtreecommitdiffstats
path: root/views/widget/widget.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 16:54:50 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-21 16:54:50 +0000
commitc642dbbd4b8d3c44cf6092b0b8ecfab2be8992e5 (patch)
treec36eaad8f67fface68c71a0d292eedc151438e52 /views/widget/widget.h
parentb964e3589f3127be36cddf3deade64f00e2afc2c (diff)
downloadchromium_src-c642dbbd4b8d3c44cf6092b0b8ecfab2be8992e5.zip
chromium_src-c642dbbd4b8d3c44cf6092b0b8ecfab2be8992e5.tar.gz
chromium_src-c642dbbd4b8d3c44cf6092b0b8ecfab2be8992e5.tar.bz2
Add CreateParams to Widget, and replace CreatePopupWidget with CreateParams.
BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6712008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget.h')
-rw-r--r--views/widget/widget.h51
1 files changed, 22 insertions, 29 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h
index b094932..c164c16 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -60,44 +60,37 @@ class Window;
class Widget : public internal::NativeWidgetDelegate,
public FocusTraversable {
public:
- enum TransparencyParam {
- Transparent,
- NotTransparent
- };
-
- enum EventsParam {
- AcceptEvents,
- NotAcceptEvents
- };
-
- enum DeleteParam {
- DeleteOnDestroy,
- NotDeleteOnDestroy
- };
-
- enum MirroringParam {
- MirrorOriginInRTL,
- DontMirrorOriginInRTL
+ struct CreateParams {
+ enum Type {
+ TYPE_TOPLEVEL,
+ TYPE_CHILD,
+ TYPE_POPUP,
+ TYPE_MENU
+ };
+
+ CreateParams();
+ explicit CreateParams(Type type);
+
+ Type type;
+
+ bool transparent;
+ bool accept_events;
+ bool delete_on_destroy;
+ bool mirror_origin_in_rtl;
+ bool has_dropshadow;
+ NativeWidget* native_widget;
};
+ Widget();
virtual ~Widget();
- // Creates a transient popup widget specific to the current platform.
- // If |mirror_in_rtl| is set to MirrorOriginInRTL, the contents of the
- // popup will be mirrored if the current locale is RTL. You should use
- // DontMirrorOriginInRTL if you are aleady handling the RTL layout within
- // the widget.
- static Widget* CreatePopupWidget(TransparencyParam transparent,
- EventsParam accept_events,
- DeleteParam delete_on_destroy,
- MirroringParam mirror_in_rtl);
+ // Creates a Widget instance suitable for use as a transient popup.
+ static Widget* CreatePopupWidget(const CreateParams& params);
// Enumerates all windows pertaining to us and notifies their
// view hierarchies that the locale has changed.
static void NotifyLocaleChanged();
- Widget();
-
// Unconverted methods -------------------------------------------------------
// TODO(beng):