summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 19:15:19 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 19:15:19 +0000
commit7f729513cbb985144d02fd6ff431f65807ef6422 (patch)
tree4943ed018a590e95692b6947d5854f43dff1be3f /views
parent83b0abca5bdf7f765a5dc5c9cb114f5745f82a72 (diff)
downloadchromium_src-7f729513cbb985144d02fd6ff431f65807ef6422.zip
chromium_src-7f729513cbb985144d02fd6ff431f65807ef6422.tar.gz
chromium_src-7f729513cbb985144d02fd6ff431f65807ef6422.tar.bz2
Build out NativeWindow interface for Window method pass-thrus.
BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6659035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/tabbed_pane/tabbed_pane_unittest.cc2
-rw-r--r--views/controls/table/table_view_unittest.cc4
-rw-r--r--views/focus/accelerator_handler_gtk_unittest.cc2
-rw-r--r--views/focus/focus_manager_unittest.cc6
-rw-r--r--views/widget/native_widget.h6
-rw-r--r--views/window/custom_frame_view.cc2
-rw-r--r--views/window/dialog_client_view.cc2
-rw-r--r--views/window/native_window.h28
-rw-r--r--views/window/window.cc49
-rw-r--r--views/window/window.h66
-rw-r--r--views/window/window_gtk.cc204
-rw-r--r--views/window/window_gtk.h47
-rw-r--r--views/window/window_win.cc412
-rw-r--r--views/window/window_win.h57
14 files changed, 456 insertions, 431 deletions
diff --git a/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/views/controls/tabbed_pane/tabbed_pane_unittest.cc
index 1ceef86..1cd1621 100644
--- a/views/controls/tabbed_pane/tabbed_pane_unittest.cc
+++ b/views/controls/tabbed_pane/tabbed_pane_unittest.cc
@@ -44,7 +44,7 @@ class TabbedPaneTest : public testing::Test, WindowDelegate {
}
virtual void TearDown() {
- window_->Close();
+ window_->CloseWindow();
message_loop_.RunAllPending();
}
diff --git a/views/controls/table/table_view_unittest.cc b/views/controls/table/table_view_unittest.cc
index 8ed5457..aa7d29d 100644
--- a/views/controls/table/table_view_unittest.cc
+++ b/views/controls/table/table_view_unittest.cc
@@ -189,7 +189,7 @@ void TableViewTest::SetUp() {
}
void TableViewTest::TearDown() {
- window_->Close();
+ window_->CloseWindow();
// Temporary workaround to avoid leak of RootView::pending_paint_task_.
message_loop_.RunAllPending();
OleUninitialize();
@@ -511,7 +511,7 @@ void TableView2Test::SetUp() {
}
void TableView2Test::TearDown() {
- window_->Close();
+ window_->CloseWindow();
// Temporary workaround to avoid leak of RootView::pending_paint_task_.
message_loop_.RunAllPending();
#if defined(OS_WIN)
diff --git a/views/focus/accelerator_handler_gtk_unittest.cc b/views/focus/accelerator_handler_gtk_unittest.cc
index e7215ee..031226b 100644
--- a/views/focus/accelerator_handler_gtk_unittest.cc
+++ b/views/focus/accelerator_handler_gtk_unittest.cc
@@ -37,7 +37,7 @@ class AcceleratorHandlerGtkTest
}
virtual void TearDown() {
- window_->Close();
+ window_->CloseWindow();
// Flush the message loop to make Purify happy.
message_loop_.RunAllPending();
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc
index 240d941..a90da38 100644
--- a/views/focus/focus_manager_unittest.cc
+++ b/views/focus/focus_manager_unittest.cc
@@ -132,7 +132,7 @@ class FocusManagerTest : public testing::Test, public WindowDelegate {
virtual void TearDown() {
if (focus_change_listener_)
GetFocusManager()->RemoveFocusChangeListener(focus_change_listener_);
- window_->Close();
+ window_->CloseWindow();
// Flush the message loop to make Purify happy.
message_loop()->RunAllPending();
@@ -1702,7 +1702,7 @@ class FocusManagerDtorTest : public FocusManagerTest {
virtual void TearDown() {
if (window_) {
- window_->Close();
+ window_->CloseWindow();
message_loop()->RunAllPending();
}
}
@@ -1720,7 +1720,7 @@ TEST_F(FocusManagerDtorTest, FocusManagerDestructedLast) {
tabbed_pane->AddTab(L"Awesome tab", button);
// Close the window.
- window_->Close();
+ window_->CloseWindow();
message_loop()->RunAllPending();
// Test window, button and focus manager should all be destructed.
diff --git a/views/widget/native_widget.h b/views/widget/native_widget.h
index 7da2fb7..26dbd9b 100644
--- a/views/widget/native_widget.h
+++ b/views/widget/native_widget.h
@@ -8,10 +8,16 @@
#include <set>
+#include "ui/gfx/native_widget_types.h"
+
namespace gfx {
class Rect;
}
+namespace ui {
+class OSExchangeData;
+}
+
namespace views {
class TooltipManager;
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc
index 4a42c1f..97e7f21 100644
--- a/views/window/custom_frame_view.cc
+++ b/views/window/custom_frame_view.cc
@@ -237,7 +237,7 @@ gfx::Size CustomFrameView::GetPreferredSize() {
void CustomFrameView::ButtonPressed(Button* sender, const views::Event& event) {
if (sender == close_button_)
- frame_->Close();
+ frame_->CloseWindow();
else if (sender == minimize_button_)
frame_->Minimize();
else if (sender == maximize_button_)
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc
index 81e8685..99512cb 100644
--- a/views/window/dialog_client_view.cc
+++ b/views/window/dialog_client_view.cc
@@ -540,7 +540,7 @@ DialogDelegate* DialogClientView::GetDialogDelegate() const {
}
void DialogClientView::Close() {
- window()->Close();
+ window()->CloseWindow();
GetDialogDelegate()->OnClose();
}
diff --git a/views/window/native_window.h b/views/window/native_window.h
index 8e5ac66..6275e1a 100644
--- a/views/window/native_window.h
+++ b/views/window/native_window.h
@@ -10,6 +10,8 @@
namespace views {
+class NonClientFrameView;
+
////////////////////////////////////////////////////////////////////////////////
// NativeWindow interface
//
@@ -64,6 +66,32 @@ class NativeWindow {
virtual NativeWidget* AsNativeWidget() = 0;
virtual const NativeWidget* AsNativeWidget() const = 0;
+
+ // Window pass-thrus ---------------------------------------------------------
+ // See documentation in window.h
+
+ virtual void SetWindowBounds(const gfx::Rect& bounds,
+ gfx::NativeWindow other_window) = 0;
+ virtual void HideWindow() = 0;
+ virtual void Activate() = 0;
+ virtual void Deactivate() = 0;
+ virtual void Maximize() = 0;
+ virtual void Minimize() = 0;
+ virtual void Restore() = 0;
+ virtual bool IsActive() const = 0;
+ virtual bool IsVisible() const = 0;
+ virtual bool IsMaximized() const = 0;
+ virtual bool IsMinimized() const = 0;
+ virtual void SetFullscreen(bool fullscreen) = 0;
+ virtual bool IsFullscreen() const = 0;
+ virtual void SetAlwaysOnTop(bool always_on_top) = 0;
+ virtual bool IsAppWindow() const = 0;
+ virtual void SetUseDragFrame(bool use_drag_frame) = 0;
+ virtual NonClientFrameView* CreateFrameViewForWindow() = 0;
+ virtual void UpdateFrameAfterFrameChange() = 0;
+ virtual gfx::NativeWindow GetNativeWindow() const = 0;
+ virtual bool ShouldUseNativeFrame() const = 0;
+ virtual void FrameTypeChanged() = 0;
};
} // namespace views
diff --git a/views/window/window.cc b/views/window/window.cc
index ee4883f..ed321c1 100644
--- a/views/window/window.cc
+++ b/views/window/window.cc
@@ -66,7 +66,7 @@ void Window::CloseSecondaryWidget(Widget* widget) {
Window* window = widget->GetWindow();
if (window) {
if (!window->IsAppWindow())
- window->Close();
+ window->CloseWindow();
} else {
// If it's not a Window, then close it anyway since it probably is
// secondary.
@@ -85,6 +85,7 @@ gfx::Rect Window::GetNormalBounds() const {
void Window::SetWindowBounds(const gfx::Rect& bounds,
gfx::NativeWindow other_window) {
+ native_window_->SetWindowBounds(bounds, other_window);
}
void Window::Show() {
@@ -98,13 +99,7 @@ void Window::Show() {
}
void Window::HideWindow() {
-}
-
-void Window::SetNativeWindowProperty(const char* name, void* value) {
-}
-
-void* Window::GetNativeWindowProperty(const char* name) {
- return NULL;
+ native_window_->HideWindow();
}
void Window::DisableInactiveRendering() {
@@ -113,12 +108,14 @@ void Window::DisableInactiveRendering() {
}
void Window::Activate() {
+ native_window_->Activate();
}
void Window::Deactivate() {
+ native_window_->Deactivate();
}
-void Window::Close() {
+void Window::CloseWindow() {
if (window_closed_) {
// It appears we can hit this code path if you close a modal dialog then
// close the last browser before the destructor is hit, which triggers
@@ -136,42 +133,47 @@ void Window::Close() {
}
void Window::Maximize() {
+ native_window_->Maximize();
}
void Window::Minimize() {
+ native_window_->Minimize();
}
void Window::Restore() {
+ native_window_->Restore();
}
bool Window::IsActive() const {
- return false;
+ return native_window_->IsActive();
}
bool Window::IsVisible() const {
- return false;
+ return native_window_->IsVisible();
}
bool Window::IsMaximized() const {
- return false;
+ return native_window_->IsMaximized();
}
bool Window::IsMinimized() const {
- return false;
+ return native_window_->IsMinimized();
}
void Window::SetFullscreen(bool fullscreen) {
+ native_window_->SetFullscreen(fullscreen);
}
bool Window::IsFullscreen() const {
- return false;
+ return native_window_->IsFullscreen();
}
void Window::SetUseDragFrame(bool use_drag_frame) {
+ native_window_->SetUseDragFrame(use_drag_frame);
}
bool Window::IsAppWindow() const {
- return false;
+ return native_window_->IsAppWindow();
}
void Window::EnableClose(bool enable) {
@@ -202,24 +204,35 @@ void Window::UpdateWindowIcon() {
}
void Window::SetIsAlwaysOnTop(bool always_on_top) {
+ native_window_->SetAlwaysOnTop(always_on_top);
}
NonClientFrameView* Window::CreateFrameViewForWindow() {
- return NULL;
+ return native_window_->CreateFrameViewForWindow();
}
void Window::UpdateFrameAfterFrameChange() {
+ native_window_->UpdateFrameAfterFrameChange();
}
gfx::NativeWindow Window::GetNativeWindow() const {
- return NULL;
+ return native_window_->GetNativeWindow();
}
bool Window::ShouldUseNativeFrame() const {
- return false;
+ return native_window_->ShouldUseNativeFrame();
}
void Window::FrameTypeChanged() {
+ native_window_->FrameTypeChanged();
+}
+
+Widget* Window::AsWidget() {
+ return const_cast<Widget*>(const_cast<const Window*>(this)->AsWidget());
+}
+
+const Widget* Window::AsWidget() const {
+ return native_window_->AsNativeWidget()->GetWidget();
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/window/window.h b/views/window/window.h
index dcdef3b..5bd270b 100644
--- a/views/window/window.h
+++ b/views/window/window.h
@@ -74,14 +74,13 @@ class Window : public internal::NativeWindowDelegate {
gfx::Rect GetBounds() const;
// Retrieves the restored bounds for the window.
- virtual gfx::Rect GetNormalBounds() const;
+ gfx::Rect GetNormalBounds() const;
// Sets the Window's bounds. The window is inserted after |other_window| in
// the window Z-order. If this window is not yet visible, other_window's
// monitor is used as the constraining rectangle, rather than this window's
// monitor.
- virtual void SetWindowBounds(const gfx::Rect& bounds,
- gfx::NativeWindow other_window);
+ void SetWindowBounds(const gfx::Rect& bounds, gfx::NativeWindow other_window);
// Makes the window visible.
void Show();
@@ -91,25 +90,6 @@ class Window : public internal::NativeWindowDelegate {
// Push/PopForceHidden.
virtual void HideWindow();
- // Sets/Gets a native window property on the underlying native window object.
- // Returns NULL if the property does not exist. Setting the property value to
- // NULL removes the property.
- virtual void SetNativeWindowProperty(const char* name, void* value);
- virtual void* GetNativeWindowProperty(const char* name);
-
-#if defined(OS_WIN)
- // TODO(beng): remove these platform-specific methods.
-
- // Hides the window if it hasn't already been force-hidden. The force hidden
- // count is tracked, so calling multiple times is allowed, you just have to
- // be sure to call PopForceHidden the same number of times.
- virtual void PushForceHidden() = 0;
-
- // Decrements the force hidden count, showing the window if we have reached
- // the top of the stack. See PushForceHidden.
- virtual void PopForceHidden() = 0;
-#endif
-
// Prevents the window from being rendered as deactivated the next time it is.
// This state is reset automatically as soon as the window becomes activated
// again. There is no ability to control the state through this API as this
@@ -117,39 +97,39 @@ class Window : public internal::NativeWindowDelegate {
void DisableInactiveRendering();
// Activates the window, assuming it already exists and is visible.
- virtual void Activate();
+ void Activate();
// Deactivates the window, making the next window in the Z order the active
// window.
- virtual void Deactivate();
+ void Deactivate();
// Closes the window, ultimately destroying it. The window hides immediately,
// and is destroyed after a return to the message loop. Close() can be called
// multiple times.
- void Close();
+ void CloseWindow();
// Maximizes/minimizes/restores the window.
- virtual void Maximize();
- virtual void Minimize();
- virtual void Restore();
+ void Maximize();
+ void Minimize();
+ void Restore();
// Whether or not the window is currently active.
- virtual bool IsActive() const;
+ bool IsActive() const;
// Whether or not the window is currently visible.
- virtual bool IsVisible() const;
+ bool IsVisible() const;
// Whether or not the window is maximized or minimized.
- virtual bool IsMaximized() const;
- virtual bool IsMinimized() const;
+ bool IsMaximized() const;
+ bool IsMinimized() const;
// Accessors for fullscreen state.
- virtual void SetFullscreen(bool fullscreen);
- virtual bool IsFullscreen() const;
+ void SetFullscreen(bool fullscreen);
+ bool IsFullscreen() const;
// Sets whether or not the window should show its frame as a "transient drag
// frame" - slightly transparent and without the standard window controls.
- virtual void SetUseDragFrame(bool use_drag_frame);
+ void SetUseDragFrame(bool use_drag_frame);
// Returns true if the Window is considered to be an "app window" - i.e.
// any window which when it is the last of its type closed causes the
@@ -158,7 +138,7 @@ class Window : public internal::NativeWindowDelegate {
// Toggles the enable state for the Close button (and the Close menu item in
// the system menu).
- virtual void EnableClose(bool enable);
+ void EnableClose(bool enable);
// Tell the window to update its title from the delegate.
void UpdateWindowTitle();
@@ -167,7 +147,7 @@ class Window : public internal::NativeWindowDelegate {
void UpdateWindowIcon();
// Sets whether or not the window is always-on-top.
- virtual void SetIsAlwaysOnTop(bool always_on_top);
+ void SetIsAlwaysOnTop(bool always_on_top);
// Creates an appropriate NonClientFrameView for this window.
virtual NonClientFrameView* CreateFrameViewForWindow();
@@ -176,13 +156,17 @@ class Window : public internal::NativeWindowDelegate {
virtual void UpdateFrameAfterFrameChange();
// Retrieves the Window's native window handle.
- virtual gfx::NativeWindow GetNativeWindow() const;
+ gfx::NativeWindow GetNativeWindow() const;
// Whether we should be using a native frame.
- virtual bool ShouldUseNativeFrame() const;
+ bool ShouldUseNativeFrame() const;
// Tell the window that something caused the frame type to change.
- virtual void FrameTypeChanged();
+ void FrameTypeChanged();
+
+ // TODO(beng): remove once Window subclasses Widget.
+ Widget* AsWidget();
+ const Widget* AsWidget() const;
WindowDelegate* window_delegate() {
return const_cast<WindowDelegate*>(
@@ -208,6 +192,8 @@ class Window : public internal::NativeWindowDelegate {
return non_client_view()->client_view();
}
+ NativeWindow* native_window() { return native_window_; }
+
protected:
// TODO(beng): Temporarily provided as a way to associate the subclass'
// implementation of NativeWidget with this.
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc
index d708e2d..a24ce61 100644
--- a/views/window/window_gtk.cc
+++ b/views/window/window_gtk.cc
@@ -104,110 +104,6 @@ void Window::CloseAllSecondaryWindows() {
g_list_free(windows);
}
-void WindowGtk::SetWindowBounds(const gfx::Rect& bounds,
- gfx::NativeWindow other_window) {
- // TODO: need to deal with other_window.
- WidgetGtk::SetBounds(bounds);
-}
-
-void WindowGtk::HideWindow() {
- Hide();
-}
-
-void WindowGtk::SetNativeWindowProperty(const char* name, void* value) {
- WidgetGtk::SetNativeWindowProperty(name, value);
-}
-
-void* WindowGtk::GetNativeWindowProperty(const char* name) {
- return WidgetGtk::GetNativeWindowProperty(name);
-}
-
-void WindowGtk::Activate() {
- gtk_window_present(GTK_WINDOW(GetNativeView()));
-}
-
-void WindowGtk::Deactivate() {
- gdk_window_lower(GTK_WIDGET(GetNativeView())->window);
-}
-
-void WindowGtk::Maximize() {
- gtk_window_maximize(GetNativeWindow());
-}
-
-void WindowGtk::Minimize() {
- gtk_window_iconify(GetNativeWindow());
-}
-
-void WindowGtk::Restore() {
- if (IsMaximized())
- gtk_window_unmaximize(GetNativeWindow());
- else if (IsMinimized())
- gtk_window_deiconify(GetNativeWindow());
- else if (IsFullscreen())
- SetFullscreen(false);
-}
-
-bool WindowGtk::IsActive() const {
- return WidgetGtk::IsActive();
-}
-
-bool WindowGtk::IsVisible() const {
- return GTK_WIDGET_VISIBLE(GetNativeView());
-}
-
-bool WindowGtk::IsMaximized() const {
- return window_state_ & GDK_WINDOW_STATE_MAXIMIZED;
-}
-
-bool WindowGtk::IsMinimized() const {
- return window_state_ & GDK_WINDOW_STATE_ICONIFIED;
-}
-
-void WindowGtk::SetFullscreen(bool fullscreen) {
- if (fullscreen)
- gtk_window_fullscreen(GetNativeWindow());
- else
- gtk_window_unfullscreen(GetNativeWindow());
-}
-
-bool WindowGtk::IsFullscreen() const {
- return window_state_ & GDK_WINDOW_STATE_FULLSCREEN;
-}
-
-void WindowGtk::SetUseDragFrame(bool use_drag_frame) {
- NOTIMPLEMENTED();
-}
-
-void WindowGtk::SetIsAlwaysOnTop(bool always_on_top) {
- gtk_window_set_keep_above(GetNativeWindow(), always_on_top);
-}
-
-NonClientFrameView* WindowGtk::CreateFrameViewForWindow() {
- // TODO(erg): Always use a custom frame view? Are there cases where we let
- // the window manager deal with the X11 equivalent of the "non-client" area?
- return new CustomFrameView(this);
-}
-
-void WindowGtk::UpdateFrameAfterFrameChange() {
- // We currently don't support different frame types on Gtk, so we don't
- // need to implement this.
- NOTIMPLEMENTED();
-}
-
-gfx::NativeWindow WindowGtk::GetNativeWindow() const {
- return GTK_WINDOW(GetNativeView());
-}
-
-bool WindowGtk::ShouldUseNativeFrame() const {
- return false;
-}
-
-void WindowGtk::FrameTypeChanged() {
- // This is called when the Theme has changed, so forward the event to the root
- // widget.
- ThemeChanged();
-}
-
Window* WindowGtk::AsWindow() {
return this;
}
@@ -404,6 +300,106 @@ const NativeWidget* WindowGtk::AsNativeWidget() const {
return this;
}
+void WindowGtk::SetWindowBounds(const gfx::Rect& bounds,
+ gfx::NativeWindow other_window) {
+ // TODO: need to deal with other_window.
+ WidgetGtk::SetBounds(bounds);
+}
+
+void WindowGtk::HideWindow() {
+ Hide();
+}
+
+void WindowGtk::Activate() {
+ gtk_window_present(GTK_WINDOW(GetNativeView()));
+}
+
+void WindowGtk::Deactivate() {
+ gdk_window_lower(GTK_WIDGET(GetNativeView())->window);
+}
+
+void WindowGtk::Maximize() {
+ gtk_window_maximize(GetNativeWindow());
+}
+
+void WindowGtk::Minimize() {
+ gtk_window_iconify(GetNativeWindow());
+}
+
+void WindowGtk::Restore() {
+ if (IsMaximized())
+ gtk_window_unmaximize(GetNativeWindow());
+ else if (IsMinimized())
+ gtk_window_deiconify(GetNativeWindow());
+ else if (IsFullscreen())
+ SetFullscreen(false);
+}
+
+bool WindowGtk::IsActive() const {
+ return WidgetGtk::IsActive();
+}
+
+bool WindowGtk::IsVisible() const {
+ return GTK_WIDGET_VISIBLE(GetNativeView());
+}
+
+bool WindowGtk::IsMaximized() const {
+ return window_state_ & GDK_WINDOW_STATE_MAXIMIZED;
+}
+
+bool WindowGtk::IsMinimized() const {
+ return window_state_ & GDK_WINDOW_STATE_ICONIFIED;
+}
+
+void WindowGtk::SetFullscreen(bool fullscreen) {
+ if (fullscreen)
+ gtk_window_fullscreen(GetNativeWindow());
+ else
+ gtk_window_unfullscreen(GetNativeWindow());
+}
+
+bool WindowGtk::IsFullscreen() const {
+ return window_state_ & GDK_WINDOW_STATE_FULLSCREEN;
+}
+
+void WindowGtk::SetUseDragFrame(bool use_drag_frame) {
+ NOTIMPLEMENTED();
+}
+
+void WindowGtk::SetAlwaysOnTop(bool always_on_top) {
+ gtk_window_set_keep_above(GetNativeWindow(), always_on_top);
+}
+
+bool WindowGtk::IsAppWindow() const {
+ return false;
+}
+
+NonClientFrameView* WindowGtk::CreateFrameViewForWindow() {
+ // TODO(erg): Always use a custom frame view? Are there cases where we let
+ // the window manager deal with the X11 equivalent of the "non-client" area?
+ return new CustomFrameView(this);
+}
+
+void WindowGtk::UpdateFrameAfterFrameChange() {
+ // We currently don't support different frame types on Gtk, so we don't
+ // need to implement this.
+ NOTIMPLEMENTED();
+}
+
+gfx::NativeWindow WindowGtk::GetNativeWindow() const {
+ return GTK_WINDOW(GetNativeView());
+}
+
+bool WindowGtk::ShouldUseNativeFrame() const {
+ return false;
+}
+
+void WindowGtk::FrameTypeChanged() {
+ // This is called when the Theme has changed, so forward the event to the root
+ // widget.
+ ThemeChanged();
+}
+
////////////////////////////////////////////////////////////////////////////////
// WindowGtk, protected:
diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h
index 91399e8..1797bf8 100644
--- a/views/window/window_gtk.h
+++ b/views/window/window_gtk.h
@@ -29,31 +29,6 @@ class WindowGtk : public WidgetGtk, public NativeWindow, public Window {
public:
virtual ~WindowGtk();
- // Overridden from Window:
- virtual void SetWindowBounds(const gfx::Rect& bounds,
- gfx::NativeWindow other_window);
- virtual void HideWindow();
- virtual void SetNativeWindowProperty(const char* name, void* value);
- virtual void* GetNativeWindowProperty(const char* name);
- virtual void Activate();
- virtual void Deactivate();
- virtual void Maximize();
- virtual void Minimize();
- virtual void Restore();
- virtual bool IsActive() const;
- virtual bool IsVisible() const;
- virtual bool IsMaximized() const;
- virtual bool IsMinimized() const;
- virtual void SetFullscreen(bool fullscreen);
- virtual bool IsFullscreen() const;
- virtual void SetUseDragFrame(bool use_drag_frame);
- virtual void SetIsAlwaysOnTop(bool always_on_top);
- virtual NonClientFrameView* CreateFrameViewForWindow();
- virtual void UpdateFrameAfterFrameChange();
- virtual gfx::NativeWindow GetNativeWindow() const;
- virtual bool ShouldUseNativeFrame() const;
- virtual void FrameTypeChanged();
-
virtual Window* AsWindow();
virtual const Window* AsWindow() const;
@@ -85,6 +60,28 @@ class WindowGtk : public WidgetGtk, public NativeWindow, public Window {
virtual void SetAccessibleState(AccessibilityTypes::State state) OVERRIDE;
virtual NativeWidget* AsNativeWidget() OVERRIDE;
virtual const NativeWidget* AsNativeWidget() const OVERRIDE;
+ virtual void SetWindowBounds(const gfx::Rect& bounds,
+ gfx::NativeWindow other_window) OVERRIDE;
+ virtual void HideWindow() OVERRIDE;
+ virtual void Activate() OVERRIDE;
+ virtual void Deactivate() OVERRIDE;
+ virtual void Maximize() OVERRIDE;
+ virtual void Minimize() OVERRIDE;
+ virtual void Restore() OVERRIDE;
+ virtual bool IsActive() const OVERRIDE;
+ virtual bool IsVisible() const OVERRIDE;
+ virtual bool IsMaximized() const OVERRIDE;
+ virtual bool IsMinimized() const OVERRIDE;
+ virtual void SetFullscreen(bool fullscreen) OVERRIDE;
+ virtual bool IsFullscreen() const OVERRIDE;
+ virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
+ virtual bool IsAppWindow() const OVERRIDE;
+ virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
+ virtual NonClientFrameView* CreateFrameViewForWindow() OVERRIDE;
+ virtual void UpdateFrameAfterFrameChange() OVERRIDE;
+ virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
+ virtual bool ShouldUseNativeFrame() const OVERRIDE;
+ virtual void FrameTypeChanged() OVERRIDE;
// For the constructor.
friend class Window;
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 96709ba..46cb97b 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -128,6 +128,13 @@ void SendFrameChanged(HWND window) {
SWP_NOSENDCHANGING | SWP_NOSIZE | SWP_NOZORDER);
}
+// Callback used to notify child windows that the top level window received a
+// DWMCompositionChanged message.
+BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) {
+ SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0);
+ return TRUE;
+}
+
// Enables or disables the menu item for the specified command and menu.
void EnableMenuItem(HMENU menu, UINT command, bool enabled) {
UINT flags = MF_BYCOMMAND | (enabled ? MF_ENABLED : MF_DISABLED | MF_GRAYED);
@@ -241,12 +248,6 @@ Window* Window::CreateChromeWindow(gfx::NativeWindow parent,
return window;
}
-void WindowWin::SetWindowBounds(const gfx::Rect& bounds,
- gfx::NativeWindow other_window) {
- SetChildBounds(GetNativeView(), GetParent(), other_window, bounds,
- kMonitorEdgePadding, 0);
-}
-
void WindowWin::Show(int show_state) {
ShowWindow(show_state);
// When launched from certain programs like bash and Windows Live Messenger,
@@ -270,19 +271,6 @@ void WindowWin::Show(int show_state) {
SetInitialFocus();
}
-void WindowWin::HideWindow() {
- // We can just call the function implemented by the widget.
- Hide();
-}
-
-void WindowWin::SetNativeWindowProperty(const char* name, void* value) {
- WidgetWin::SetNativeWindowProperty(name, value);
-}
-
-void* WindowWin::GetNativeWindowProperty(const char* name) {
- return WidgetWin::GetNativeWindowProperty(name);
-}
-
void WindowWin::PushForceHidden() {
if (force_hidden_count_++ == 0)
Hide();
@@ -295,196 +283,6 @@ void WindowWin::PopForceHidden() {
}
}
-namespace {
-static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) {
- SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0);
- return TRUE;
-}
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// WindowWin, Window implementation:
-
-void WindowWin::Activate() {
- if (IsMinimized())
- ::ShowWindow(GetNativeView(), SW_RESTORE);
- ::SetWindowPos(GetNativeView(), HWND_TOP, 0, 0, 0, 0,
- SWP_NOSIZE | SWP_NOMOVE);
- SetForegroundWindow(GetNativeView());
-}
-
-void WindowWin::Deactivate() {
- HWND hwnd = ::GetNextWindow(GetNativeView(), GW_HWNDNEXT);
- if (hwnd)
- ::SetForegroundWindow(hwnd);
-}
-
-void WindowWin::Maximize() {
- ExecuteSystemMenuCommand(SC_MAXIMIZE);
-}
-
-void WindowWin::Minimize() {
- ExecuteSystemMenuCommand(SC_MINIMIZE);
-}
-
-void WindowWin::Restore() {
- ExecuteSystemMenuCommand(SC_RESTORE);
-}
-
-bool WindowWin::IsActive() const {
- return is_active_;
-}
-
-bool WindowWin::IsVisible() const {
- return !!::IsWindowVisible(GetNativeView());
-}
-
-bool WindowWin::IsMaximized() const {
- return !!::IsZoomed(GetNativeView());
-}
-
-bool WindowWin::IsMinimized() const {
- return !!::IsIconic(GetNativeView());
-}
-
-void WindowWin::SetFullscreen(bool fullscreen) {
- if (fullscreen_ == fullscreen)
- return; // Nothing to do.
-
- // Reduce jankiness during the following position changes by hiding the window
- // until it's in the final position.
- PushForceHidden();
-
- // Size/position/style window appropriately.
- if (!fullscreen_) {
- // Save current window information. We force the window into restored mode
- // before going fullscreen because Windows doesn't seem to hide the
- // taskbar if the window is in the maximized state.
- saved_window_info_.maximized = IsMaximized();
- if (saved_window_info_.maximized)
- Restore();
- saved_window_info_.style = GetWindowLong(GWL_STYLE);
- saved_window_info_.ex_style = GetWindowLong(GWL_EXSTYLE);
- GetWindowRect(&saved_window_info_.window_rect);
- }
-
- // Toggle fullscreen mode.
- fullscreen_ = fullscreen;
-
- if (fullscreen_) {
- // Set new window style and size.
- MONITORINFO monitor_info;
- monitor_info.cbSize = sizeof(monitor_info);
- GetMonitorInfo(MonitorFromWindow(GetNativeView(), MONITOR_DEFAULTTONEAREST),
- &monitor_info);
- gfx::Rect monitor_rect(monitor_info.rcMonitor);
- SetWindowLong(GWL_STYLE,
- saved_window_info_.style & ~(WS_CAPTION | WS_THICKFRAME));
- SetWindowLong(GWL_EXSTYLE,
- saved_window_info_.ex_style & ~(WS_EX_DLGMODALFRAME |
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
- SetWindowPos(NULL, monitor_rect.x(), monitor_rect.y(),
- monitor_rect.width(), monitor_rect.height(),
- SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
- } else {
- // Reset original window style and size. The multiple window size/moves
- // here are ugly, but if SetWindowPos() doesn't redraw, the taskbar won't be
- // repainted. Better-looking methods welcome.
- gfx::Rect new_rect(saved_window_info_.window_rect);
- SetWindowLong(GWL_STYLE, saved_window_info_.style);
- SetWindowLong(GWL_EXSTYLE, saved_window_info_.ex_style);
- SetWindowPos(NULL, new_rect.x(), new_rect.y(), new_rect.width(),
- new_rect.height(),
- SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
- if (saved_window_info_.maximized)
- Maximize();
- }
-
- // Undo our anti-jankiness hacks.
- PopForceHidden();
-}
-
-bool WindowWin::IsFullscreen() const {
- return fullscreen_;
-}
-
-void WindowWin::SetUseDragFrame(bool use_drag_frame) {
- if (use_drag_frame) {
- // Make the frame slightly transparent during the drag operation.
- drag_frame_saved_window_style_ = GetWindowLong(GWL_STYLE);
- drag_frame_saved_window_ex_style_ = GetWindowLong(GWL_EXSTYLE);
- SetWindowLong(GWL_EXSTYLE,
- drag_frame_saved_window_ex_style_ | WS_EX_LAYERED);
- // Remove the captions tyle so the window doesn't have window controls for a
- // more "transparent" look.
- SetWindowLong(GWL_STYLE, drag_frame_saved_window_style_ & ~WS_CAPTION);
- SetLayeredWindowAttributes(GetNativeWindow(), RGB(0xFF, 0xFF, 0xFF),
- kDragFrameWindowAlpha, LWA_ALPHA);
- } else {
- SetWindowLong(GWL_STYLE, drag_frame_saved_window_style_);
- SetWindowLong(GWL_EXSTYLE, drag_frame_saved_window_ex_style_);
- }
-}
-
-void WindowWin::SetIsAlwaysOnTop(bool always_on_top) {
- ::SetWindowPos(GetNativeView(),
- always_on_top ? HWND_TOPMOST : HWND_NOTOPMOST,
- 0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
-}
-
-NonClientFrameView* WindowWin::CreateFrameViewForWindow() {
- if (ShouldUseNativeFrame())
- return new NativeFrameView(this);
- return new CustomFrameView(this);
-}
-
-void WindowWin::UpdateFrameAfterFrameChange() {
- // We've either gained or lost a custom window region, so reset it now.
- ResetWindowRegion(true);
-}
-
-gfx::NativeWindow WindowWin::GetNativeWindow() const {
- return GetNativeView();
-}
-
-bool WindowWin::ShouldUseNativeFrame() const {
- ui::ThemeProvider* tp = GetThemeProvider();
- if (!tp)
- return WidgetWin::IsAeroGlassEnabled();
- return tp->ShouldUseNativeFrame();
-}
-
-void WindowWin::FrameTypeChanged() {
- // Called when the frame type could possibly be changing (theme change or
- // DWM composition change).
- if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- // We need to toggle the rendering policy of the DWM/glass frame as we
- // change from opaque to glass. "Non client rendering enabled" means that
- // the DWM's glass non-client rendering is enabled, which is why
- // DWMNCRP_ENABLED is used for the native frame case. _DISABLED means the
- // DWM doesn't render glass, and so is used in the custom frame case.
- DWMNCRENDERINGPOLICY policy =
- delegate_->IsUsingNativeFrame() ? DWMNCRP_ENABLED : DWMNCRP_DISABLED;
- DwmSetWindowAttribute(GetNativeView(), DWMWA_NCRENDERING_POLICY,
- &policy, sizeof(DWMNCRENDERINGPOLICY));
- }
-
- // Send a frame change notification, since the non-client metrics have
- // changed.
- SendFrameChanged(GetNativeView());
-
- // Update the non-client view with the correct frame view for the active frame
- // type.
- GetWindow()->non_client_view()->UpdateFrame();
-
- // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
- // to notify our children too, since we can have MDI child windows who need to
- // update their appearance.
- EnumChildWindows(GetNativeView(), &SendDwmCompositionChanged, NULL);
-}
-
-
// static
gfx::Font WindowWin::GetWindowTitleFont() {
NONCLIENTMETRICS ncm;
@@ -594,6 +392,10 @@ LRESULT WindowWin::OnAppCommand(HWND window, short app_command, WORD device,
return 0;
}
+void WindowWin::OnClose() {
+ GetWindow()->CloseWindow();
+}
+
void WindowWin::OnCommand(UINT notification_code, int command_id, HWND window) {
// If the notification code is > 1 it means it is control specific and we
// should ignore it.
@@ -1211,6 +1013,198 @@ const NativeWidget* WindowWin::AsNativeWidget() const {
return this;
}
+void WindowWin::SetWindowBounds(const gfx::Rect& bounds,
+ gfx::NativeWindow other_window) {
+ SetChildBounds(GetNativeView(), GetParent(), other_window, bounds,
+ kMonitorEdgePadding, 0);
+}
+
+void WindowWin::HideWindow() {
+ // We can just call the function implemented by the widget.
+ Hide();
+}
+
+void WindowWin::Activate() {
+ if (IsMinimized())
+ ::ShowWindow(GetNativeView(), SW_RESTORE);
+ ::SetWindowPos(GetNativeView(), HWND_TOP, 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE);
+ SetForegroundWindow(GetNativeView());
+}
+
+void WindowWin::Deactivate() {
+ HWND hwnd = ::GetNextWindow(GetNativeView(), GW_HWNDNEXT);
+ if (hwnd)
+ ::SetForegroundWindow(hwnd);
+}
+
+void WindowWin::Maximize() {
+ ExecuteSystemMenuCommand(SC_MAXIMIZE);
+}
+
+void WindowWin::Minimize() {
+ ExecuteSystemMenuCommand(SC_MINIMIZE);
+}
+
+void WindowWin::Restore() {
+ ExecuteSystemMenuCommand(SC_RESTORE);
+}
+
+bool WindowWin::IsActive() const {
+ return is_active_;
+}
+
+bool WindowWin::IsVisible() const {
+ return !!::IsWindowVisible(GetNativeView());
+}
+
+bool WindowWin::IsMaximized() const {
+ return !!::IsZoomed(GetNativeView());
+}
+
+bool WindowWin::IsMinimized() const {
+ return !!::IsIconic(GetNativeView());
+}
+
+void WindowWin::SetFullscreen(bool fullscreen) {
+ if (fullscreen_ == fullscreen)
+ return; // Nothing to do.
+
+ // Reduce jankiness during the following position changes by hiding the window
+ // until it's in the final position.
+ PushForceHidden();
+
+ // Size/position/style window appropriately.
+ if (!fullscreen_) {
+ // Save current window information. We force the window into restored mode
+ // before going fullscreen because Windows doesn't seem to hide the
+ // taskbar if the window is in the maximized state.
+ saved_window_info_.maximized = IsMaximized();
+ if (saved_window_info_.maximized)
+ Restore();
+ saved_window_info_.style = GetWindowLong(GWL_STYLE);
+ saved_window_info_.ex_style = GetWindowLong(GWL_EXSTYLE);
+ GetWindowRect(&saved_window_info_.window_rect);
+ }
+
+ // Toggle fullscreen mode.
+ fullscreen_ = fullscreen;
+
+ if (fullscreen_) {
+ // Set new window style and size.
+ MONITORINFO monitor_info;
+ monitor_info.cbSize = sizeof(monitor_info);
+ GetMonitorInfo(MonitorFromWindow(GetNativeView(), MONITOR_DEFAULTTONEAREST),
+ &monitor_info);
+ gfx::Rect monitor_rect(monitor_info.rcMonitor);
+ SetWindowLong(GWL_STYLE,
+ saved_window_info_.style & ~(WS_CAPTION | WS_THICKFRAME));
+ SetWindowLong(GWL_EXSTYLE,
+ saved_window_info_.ex_style & ~(WS_EX_DLGMODALFRAME |
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
+ SetWindowPos(NULL, monitor_rect.x(), monitor_rect.y(),
+ monitor_rect.width(), monitor_rect.height(),
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
+ } else {
+ // Reset original window style and size. The multiple window size/moves
+ // here are ugly, but if SetWindowPos() doesn't redraw, the taskbar won't be
+ // repainted. Better-looking methods welcome.
+ gfx::Rect new_rect(saved_window_info_.window_rect);
+ SetWindowLong(GWL_STYLE, saved_window_info_.style);
+ SetWindowLong(GWL_EXSTYLE, saved_window_info_.ex_style);
+ SetWindowPos(NULL, new_rect.x(), new_rect.y(), new_rect.width(),
+ new_rect.height(),
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
+ if (saved_window_info_.maximized)
+ Maximize();
+ }
+
+ // Undo our anti-jankiness hacks.
+ PopForceHidden();
+}
+
+bool WindowWin::IsFullscreen() const {
+ return fullscreen_;
+}
+
+void WindowWin::SetAlwaysOnTop(bool always_on_top) {
+ ::SetWindowPos(GetNativeView(), always_on_top ? HWND_TOPMOST : HWND_NOTOPMOST,
+ 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+}
+
+bool WindowWin::IsAppWindow() const {
+ return false;
+}
+
+void WindowWin::SetUseDragFrame(bool use_drag_frame) {
+ if (use_drag_frame) {
+ // Make the frame slightly transparent during the drag operation.
+ drag_frame_saved_window_style_ = GetWindowLong(GWL_STYLE);
+ drag_frame_saved_window_ex_style_ = GetWindowLong(GWL_EXSTYLE);
+ SetWindowLong(GWL_EXSTYLE,
+ drag_frame_saved_window_ex_style_ | WS_EX_LAYERED);
+ // Remove the captions tyle so the window doesn't have window controls for a
+ // more "transparent" look.
+ SetWindowLong(GWL_STYLE, drag_frame_saved_window_style_ & ~WS_CAPTION);
+ SetLayeredWindowAttributes(GetNativeWindow(), RGB(0xFF, 0xFF, 0xFF),
+ kDragFrameWindowAlpha, LWA_ALPHA);
+ } else {
+ SetWindowLong(GWL_STYLE, drag_frame_saved_window_style_);
+ SetWindowLong(GWL_EXSTYLE, drag_frame_saved_window_ex_style_);
+ }
+}
+
+NonClientFrameView* WindowWin::CreateFrameViewForWindow() {
+ if (ShouldUseNativeFrame())
+ return new NativeFrameView(this);
+ return new CustomFrameView(this);
+}
+
+void WindowWin::UpdateFrameAfterFrameChange() {
+ // We've either gained or lost a custom window region, so reset it now.
+ ResetWindowRegion(true);
+}
+
+gfx::NativeWindow WindowWin::GetNativeWindow() const {
+ return GetNativeView();
+}
+
+bool WindowWin::ShouldUseNativeFrame() const {
+ ui::ThemeProvider* tp = GetThemeProvider();
+ if (!tp)
+ return WidgetWin::IsAeroGlassEnabled();
+ return tp->ShouldUseNativeFrame();
+}
+
+void WindowWin::FrameTypeChanged() {
+ // Called when the frame type could possibly be changing (theme change or
+ // DWM composition change).
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
+ // We need to toggle the rendering policy of the DWM/glass frame as we
+ // change from opaque to glass. "Non client rendering enabled" means that
+ // the DWM's glass non-client rendering is enabled, which is why
+ // DWMNCRP_ENABLED is used for the native frame case. _DISABLED means the
+ // DWM doesn't render glass, and so is used in the custom frame case.
+ DWMNCRENDERINGPOLICY policy =
+ delegate_->IsUsingNativeFrame() ? DWMNCRP_ENABLED : DWMNCRP_DISABLED;
+ DwmSetWindowAttribute(GetNativeView(), DWMWA_NCRENDERING_POLICY,
+ &policy, sizeof(DWMNCRENDERINGPOLICY));
+ }
+
+ // Send a frame change notification, since the non-client metrics have
+ // changed.
+ SendFrameChanged(GetNativeView());
+
+ // Update the non-client view with the correct frame view for the active frame
+ // type.
+ GetWindow()->non_client_view()->UpdateFrame();
+
+ // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
+ // to notify our children too, since we can have MDI child windows who need to
+ // update their appearance.
+ EnumChildWindows(GetNativeView(), &SendDwmCompositionChanged, NULL);
+}
+
////////////////////////////////////////////////////////////////////////////////
// WindowWin, private:
diff --git a/views/window/window_win.h b/views/window/window_win.h
index 9c74f75..64310ba 100644
--- a/views/window/window_win.h
+++ b/views/window/window_win.h
@@ -54,32 +54,14 @@ class WindowWin : public WidgetWin,
focus_on_creation_ = focus_on_creation;
}
- // Overridden from Window:
- virtual void SetWindowBounds(const gfx::Rect& bounds,
- gfx::NativeWindow other_window) OVERRIDE;
- virtual void HideWindow() OVERRIDE;
- virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
- virtual void* GetNativeWindowProperty(const char* name) OVERRIDE;
- virtual void PushForceHidden() OVERRIDE;
- virtual void PopForceHidden() OVERRIDE;
- virtual void Activate() OVERRIDE;
- virtual void Deactivate() OVERRIDE;
- virtual void Maximize() OVERRIDE;
- virtual void Minimize() OVERRIDE;
- virtual void Restore() OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
- virtual bool IsVisible() const OVERRIDE;
- virtual bool IsMaximized() const OVERRIDE;
- virtual bool IsMinimized() const OVERRIDE;
- virtual void SetFullscreen(bool fullscreen) OVERRIDE;
- virtual bool IsFullscreen() const OVERRIDE;
- virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
- virtual void SetIsAlwaysOnTop(bool always_on_top) OVERRIDE;
- virtual NonClientFrameView* CreateFrameViewForWindow() OVERRIDE;
- virtual void UpdateFrameAfterFrameChange() OVERRIDE;
- virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
- virtual bool ShouldUseNativeFrame() const OVERRIDE;
- virtual void FrameTypeChanged() OVERRIDE;
+ // Hides the window if it hasn't already been force-hidden. The force hidden
+ // count is tracked, so calling multiple times is allowed, you just have to
+ // be sure to call PopForceHidden the same number of times.
+ void PushForceHidden();
+
+ // Decrements the force hidden count, showing the window if we have reached
+ // the top of the stack. See PushForceHidden.
+ void PopForceHidden();
// Returns the system set window title font.
static gfx::Font GetWindowTitleFont();
@@ -115,6 +97,7 @@ class WindowWin : public WidgetWin,
short app_command,
WORD device,
int keystate) OVERRIDE;
+ virtual void OnClose() OVERRIDE;
virtual void OnCommand(UINT notification_code,
int command_id,
HWND window) OVERRIDE;
@@ -169,6 +152,28 @@ class WindowWin : public WidgetWin,
virtual void SetAccessibleState(AccessibilityTypes::State state) OVERRIDE;
virtual NativeWidget* AsNativeWidget() OVERRIDE;
virtual const NativeWidget* AsNativeWidget() const OVERRIDE;
+ virtual void SetWindowBounds(const gfx::Rect& bounds,
+ gfx::NativeWindow other_window) OVERRIDE;
+ virtual void HideWindow() OVERRIDE;
+ virtual void Activate() OVERRIDE;
+ virtual void Deactivate() OVERRIDE;
+ virtual void Maximize() OVERRIDE;
+ virtual void Minimize() OVERRIDE;
+ virtual void Restore() OVERRIDE;
+ virtual bool IsActive() const OVERRIDE;
+ virtual bool IsVisible() const OVERRIDE;
+ virtual bool IsMaximized() const OVERRIDE;
+ virtual bool IsMinimized() const OVERRIDE;
+ virtual void SetFullscreen(bool fullscreen) OVERRIDE;
+ virtual bool IsFullscreen() const OVERRIDE;
+ virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
+ virtual bool IsAppWindow() const OVERRIDE;
+ virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
+ virtual NonClientFrameView* CreateFrameViewForWindow() OVERRIDE;
+ virtual void UpdateFrameAfterFrameChange() OVERRIDE;
+ virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
+ virtual bool ShouldUseNativeFrame() const OVERRIDE;
+ virtual void FrameTypeChanged() OVERRIDE;
private:
// Information saved before going into fullscreen mode, used to restore the