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

Unified Diff: views/widget/widget.h

Issue 7129022: Move last of event handlers down to NativeWidgetWin/Gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « views/widget/native_widget_win_unittest.cc ('k') | views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.h
===================================================================
--- views/widget/widget.h (revision 88529)
+++ views/widget/widget.h (working copy)
@@ -93,7 +93,8 @@
struct InitParams {
enum Type {
- TYPE_WINDOW, // A Window, like a frame window.
+ TYPE_WINDOW, // A decorated Window, like a frame window.
+ // Widgets of TYPE_WINDOW will have a NonClientView.
TYPE_WINDOW_FRAMELESS,
// An undecorated Window.
TYPE_CONTROL, // A control, like a button.
@@ -166,6 +167,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 -------------------------------------------------------
@@ -447,6 +459,8 @@
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;
@@ -518,6 +532,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
@@ -568,6 +585,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);
};
« no previous file with comments | « views/widget/native_widget_win_unittest.cc ('k') | views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698