diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 23:01:12 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 23:01:12 +0000 |
commit | 677c2ee722f21b54cf3dec42a0a4b9d35b00fe87 (patch) | |
tree | 3f3d3f9ab92ed9d3c14546e29f6ea013ea98c8f8 /views/widget/widget.h | |
parent | 1ab7d168f2037ce57108af43129fcf2481072244 (diff) | |
download | chromium_src-677c2ee722f21b54cf3dec42a0a4b9d35b00fe87.zip chromium_src-677c2ee722f21b54cf3dec42a0a4b9d35b00fe87.tar.gz chromium_src-677c2ee722f21b54cf3dec42a0a4b9d35b00fe87.tar.bz2 |
Revert 87702 - Move NonClientView and FrameType logic from Window to Widget.
Also fixes leak of default WidgetDelegate by replacing it with a DefaultWidgetDelegate subclass that overrides DeleteDelegate and deletes itself. This required moving the destruction logic from Window down onto Widget.
BUG=72040
TEST=none
Review URL: http://codereview.chromium.org/7033049
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/7109028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget.h')
-rw-r--r-- | views/widget/widget.h | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h index 19952eb..912cc76 100644 --- a/views/widget/widget.h +++ b/views/widget/widget.h @@ -15,8 +15,6 @@ #include "ui/gfx/rect.h" #include "views/focus/focus_manager.h" #include "views/widget/native_widget_delegate.h" -#include "views/window/client_view.h" -#include "views/window/non_client_view.h" #if defined(OS_WIN) // Windows headers define macros for these function names which screw with us. @@ -48,7 +46,6 @@ namespace views { class DefaultThemeProvider; class InputMethod; class NativeWidget; -class NonClientFrameView; class TooltipManager; class View; class WidgetDelegate; @@ -85,12 +82,6 @@ class RootView; class Widget : public internal::NativeWidgetDelegate, public FocusTraversable { public: - enum FrameType { - FRAME_TYPE_DEFAULT, // Use whatever the default would be. - FRAME_TYPE_FORCE_CUSTOM, // Force the custom frame. - FRAME_TYPE_FORCE_NATIVE // Force the native frame. - }; - struct InitParams { enum Type { TYPE_WINDOW, // A Window, like a frame window. @@ -363,44 +354,6 @@ class Widget : public internal::NativeWidgetDelegate, void SetFocusTraversableParent(FocusTraversable* parent); void SetFocusTraversableParentView(View* parent_view); - // Updates the frame after an event caused it to be changed. - virtual void UpdateFrameAfterFrameChange(); - - void set_frame_type(FrameType frame_type) { frame_type_ = frame_type; } - FrameType frame_type() const { return frame_type_; } - - // Creates an appropriate NonClientFrameView for this widget. The - // WidgetDelegate is given the first opportunity to create one, followed by - // the NativeWidget implementation. If both return NULL, a default one is - // created. - virtual NonClientFrameView* CreateNonClientFrameView(); - - // Whether we should be using a native frame. - bool ShouldUseNativeFrame() const; - - // Forces the frame into the alternate frame type (custom or native) depending - // on its current state. - void DebugToggleFrameType(); - - // Tell the window that something caused the frame type to change. - void FrameTypeChanged(); - - NonClientView* non_client_view() { - return const_cast<NonClientView*>( - const_cast<const Widget*>(this)->non_client_view()); - } - const NonClientView* non_client_view() const { - return non_client_view_; - } - - ClientView* client_view() { - return const_cast<ClientView*>( - const_cast<const Widget*>(this)->client_view()); - } - const ClientView* client_view() const { - return non_client_view()->client_view(); - } - const ui::Compositor* compositor() const { return compositor_.get(); } ui::Compositor* compositor() { return compositor_.get(); } @@ -422,7 +375,6 @@ class Widget : public internal::NativeWidgetDelegate, virtual void OnNativeFocus(gfx::NativeView focused_view) OVERRIDE; virtual void OnNativeBlur(gfx::NativeView focused_view) OVERRIDE; virtual void OnNativeWidgetCreated() OVERRIDE; - virtual void OnNativeWidgetDestroyed() OVERRIDE; virtual void OnSizeChanged(const gfx::Size& new_size) OVERRIDE; virtual bool HasFocusManager() const OVERRIDE; virtual bool OnNativeWidgetPaintAccelerated( @@ -478,8 +430,6 @@ class Widget : public internal::NativeWidgetDelegate, NativeWidget* native_widget_; - InitParams::Type type_; - // Non-owned pointer to the Widget's delegate. May be NULL if no delegate is // being used. WidgetDelegate* widget_delegate_; @@ -489,12 +439,6 @@ class Widget : public internal::NativeWidgetDelegate, // this and tooltip_manager_. scoped_ptr<internal::RootView> root_view_; - // The View that provides the non-client area of the window (title bar, - // window controls, sizing borders etc). To use an implementation other than - // the default, this class must be sub-classed and this value set to the - // desired implementation before calling |InitWindow()|. - NonClientView* non_client_view_; - // The focus manager keeping track of focus for this Widget and any of its // children. NULL for non top-level widgets. // WARNING: RootView's destructor calls into the FocusManager. As such, this @@ -517,10 +461,6 @@ class Widget : public internal::NativeWidgetDelegate, // See set_is_secondary_widget(). bool is_secondary_widget_; - // The current frame type in use by this window. Defaults to - // FRAME_TYPE_DEFAULT. - FrameType frame_type_; - DISALLOW_COPY_AND_ASSIGN(Widget); }; |