}
void NativeWindowViews::Show() {
- window_->Show();
+ window_->native_widget_private()->ShowWithWindowState(GetRestoredState());
}
void NativeWindowViews::ShowInactive() {
return window_bounds;
}
+ui::WindowShowState NativeWindowViews::GetRestoredState() {
+ if (IsMaximized())
+ return ui::SHOW_STATE_MAXIMIZED;
+ if (IsFullscreen())
+ return ui::SHOW_STATE_FULLSCREEN;
+
+ return ui::SHOW_STATE_NORMAL;
+}
+
// static
NativeWindow* NativeWindow::Create(content::WebContents* web_contents,
const mate::Dictionary& options) {
// in client area we need to substract/add menu bar's height in convertions.
gfx::Rect ContentBoundsToWindowBounds(const gfx::Rect& content_bounds);
+ // Returns the restore state for the window.
+ ui::WindowShowState GetRestoredState();
+
scoped_ptr<views::Widget> window_;
views::View* web_view_; // Managed by inspectable_web_contents_.