| Index: views/widget/widget.h
|
| ===================================================================
|
| --- views/widget/widget.h (revision 88384)
|
| +++ views/widget/widget.h (working copy)
|
| @@ -94,6 +94,7 @@
|
| struct InitParams {
|
| enum Type {
|
| TYPE_WINDOW, // A Window, like a frame window.
|
| + // Widgets of TYPE_WINDOW will have a NonClientView.
|
| TYPE_CONTROL, // A control, like a button.
|
| TYPE_POPUP, // An undecorated Window, with transient properties.
|
| TYPE_MENU // An undecorated Window, with transient properties
|
| @@ -164,6 +165,17 @@
|
| // Passes through to NativeWidget::GetWidgetForNativeView().
|
| static Widget* GetWidgetForNativeView(gfx::NativeView native_view);
|
|
|
| +
|
| + // Returns the preferred size of the contents view of this window based on
|
| + // its localized size data. The width in cols is held in a localized string
|
| + // resource identified by |col_resource_id|, the height in the same fashion.
|
| + // TODO(beng): This should eventually live somewhere else, probably closer to
|
| + // ClientView.
|
| + static int GetLocalizedContentsWidth(int col_resource_id);
|
| + static int GetLocalizedContentsHeight(int row_resource_id);
|
| + static gfx::Size GetLocalizedContentsSize(int col_resource_id,
|
| + int row_resource_id);
|
| +
|
| void Init(const InitParams& params);
|
|
|
| // Unconverted methods -------------------------------------------------------
|
| @@ -445,13 +457,15 @@
|
| virtual const Window* AsWindow() const;
|
|
|
| // Overridden from NativeWidgetDelegate:
|
| + virtual bool IsModal() const OVERRIDE;
|
| + virtual bool IsDialogBox() const OVERRIDE;
|
| virtual bool CanActivate() const OVERRIDE;
|
| virtual bool IsInactiveRenderingDisabled() const OVERRIDE;
|
| virtual void EnableInactiveRendering() OVERRIDE;
|
| virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE;
|
| virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE;
|
| virtual void OnNativeBlur(gfx::NativeView focused_view) OVERRIDE;
|
| - virtual void OnNativeWidgetCreated() OVERRIDE;
|
| + virtual void OnNativeWidgetCreated(const gfx::Rect& create_bounds) OVERRIDE;
|
| virtual void OnNativeWidgetDestroying() OVERRIDE;
|
| virtual void OnNativeWidgetDestroyed() OVERRIDE;
|
| virtual gfx::Size GetMinimumSize() OVERRIDE;
|
| @@ -516,6 +530,9 @@
|
| // window delegate.
|
| void SaveWindowPosition();
|
|
|
| + // Sizes and positions the window just after it is created.
|
| + void SetInitialBounds(const gfx::Rect& bounds);
|
| +
|
| NativeWidget* native_widget_;
|
|
|
| // Non-owned pointer to the Widget's delegate. May be NULL if no delegate is
|
| @@ -566,6 +583,13 @@
|
| // Set to true if the widget is in the process of closing.
|
| bool widget_closed_;
|
|
|
| + // The saved maximized state for this window. See note in SetInitialBounds
|
| + // that explains why we save this.
|
| + bool saved_maximized_state_;
|
| +
|
| + // The smallest size the window can be.
|
| + gfx::Size minimum_size_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Widget);
|
| };
|
|
|
|
|