diff options
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 2 | ||||
-rw-r--r-- | views/window/window.h | 2 | ||||
-rw-r--r-- | views/window/window_gtk.cc | 29 | ||||
-rw-r--r-- | views/window/window_gtk.h | 2 |
4 files changed, 17 insertions, 18 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 24e1560..78a091c 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -730,7 +730,7 @@ void BrowserView::FlashFrame() { fwi.dwTimeout = 0; FlashWindowEx(&fwi); #else - NOTIMPLEMENTED(); + // Doesn't matter for chrome os. #endif } diff --git a/views/window/window.h b/views/window/window.h index c226c84..dc7a8e3 100644 --- a/views/window/window.h +++ b/views/window/window.h @@ -73,6 +73,7 @@ class Window { // Push/PopForceHidden. virtual void HideWindow() = 0; +#if defined(OS_WIN) // 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. @@ -81,6 +82,7 @@ class Window { // Decrements the force hidden count, showing the window if we have reached // the top of the stack. See PushForceHidden. virtual void PopForceHidden() = 0; +#endif // Activate the window, assuming it already exists and is visible. virtual void Activate() = 0; diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 296b6cf..26c3669 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -104,7 +104,7 @@ gfx::Rect WindowGtk::GetBounds() const { } gfx::Rect WindowGtk::GetNormalBounds() const { - NOTIMPLEMENTED(); + // We currently don't support tiling, so this doesn't matter. return GetBounds(); } @@ -122,16 +122,8 @@ void WindowGtk::HideWindow() { Hide(); } -void WindowGtk::PushForceHidden() { - NOTIMPLEMENTED(); -} - -void WindowGtk::PopForceHidden() { - NOTIMPLEMENTED(); -} - void WindowGtk::Activate() { - NOTIMPLEMENTED(); + gtk_window_present(GTK_WINDOW(GetNativeView())); } void WindowGtk::Close() { @@ -155,7 +147,12 @@ void WindowGtk::Minimize() { } void WindowGtk::Restore() { - NOTIMPLEMENTED(); + if (IsMaximized()) + gtk_window_unmaximize(GetNativeWindow()); + else if (IsMinimized()) + gtk_window_deiconify(GetNativeWindow()); + else if (IsFullscreen()) + SetFullscreen(false); } bool WindowGtk::IsActive() const { @@ -209,7 +206,7 @@ void WindowGtk::UpdateWindowTitle() { } void WindowGtk::UpdateWindowIcon() { - NOTIMPLEMENTED(); + // Doesn't matter for chrome os. } void WindowGtk::SetIsAlwaysOnTop(bool always_on_top) { @@ -223,6 +220,8 @@ NonClientFrameView* WindowGtk::CreateFrameViewForWindow() { } void WindowGtk::UpdateFrameAfterFrameChange() { + // We currently don't support different frame types on Gtk, so we don't + // need to implement this. NOTIMPLEMENTED(); } @@ -247,6 +246,8 @@ bool WindowGtk::ShouldUseNativeFrame() const { } void WindowGtk::FrameTypeChanged() { + // We currently don't support different frame types on Gtk, so we don't + // need to implement this. NOTIMPLEMENTED(); } @@ -404,9 +405,7 @@ void WindowGtk::SaveWindowPosition() { return; bool maximized = window_state_ & GDK_WINDOW_STATE_MAXIMIZED; - gfx::Rect bounds; - WidgetGtk::GetBounds(&bounds, true); - window_delegate_->SaveWindowPlacement(bounds, maximized); + window_delegate_->SaveWindowPlacement(GetBounds(), maximized); } void WindowGtk::SetInitialBounds(GtkWindow* parent, diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index fb89ff1..237b6f9 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -31,8 +31,6 @@ class WindowGtk : public WidgetGtk, public Window { gfx::NativeWindow other_window); virtual void Show(); virtual void HideWindow(); - virtual void PushForceHidden(); - virtual void PopForceHidden(); virtual void Activate(); virtual void Close(); virtual void Maximize(); |