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

Unified Diff: chrome/browser/ui/views/frame/browser_frame_ash.cc

Issue 42353002: Introduce WindowStateDelegate::ToggleFullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« ash/wm/window_state.h ('K') | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_frame_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_frame_ash.cc b/chrome/browser/ui/views/frame/browser_frame_ash.cc
index 07f4e332ebbf953b1a7b1912b59e0d2153efdc9b..7dbca82cd8176ca8487f9a911c56c79cc647283b 100644
--- a/chrome/browser/ui/views/frame/browser_frame_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_ash.cc
@@ -86,8 +86,18 @@ BrowserFrameAsh::BrowserFrameAsh(BrowserFrame* browser_frame,
window_property_watcher_(new WindowPropertyWatcher(this, browser_frame)) {
GetNativeWindow()->SetName(kWindowName);
GetNativeWindow()->AddObserver(window_property_watcher_.get());
- if (browser_view->browser()->is_type_tabbed())
- ash::wm::SetAnimateToFullscreen(GetNativeWindow(), false);
+ Browser* browser = browser_view->browser();
+ ash::wm::WindowState* window_state =
+ ash::wm::GetWindowState(GetNativeWindow());
+
+ window_state->set_animate_to_fullscreen(!browser->is_type_tabbed());
+
+ // AppNonClientFrameViewAsh shows only the window controls and no other
+ // window decorations which is pretty close to fullscreen. Put v1 apps
+ // into maximized mode instead of fullscreen to avoid showing the ugly
+ // fullscreen exit bubble.
+ window_state->set_maximize_when_fullscreen(
+ browser->is_app() && browser->app_type() != Browser::APP_TYPE_CHILD);
// Turn on auto window management if we don't need an explicit bounds.
// This way the requested bounds are honored.
@@ -98,10 +108,7 @@ BrowserFrameAsh::BrowserFrameAsh(BrowserFrame* browser_frame,
// For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys
// like brightness, volume, etc. Otherwise these keys are handled by the
// Ash window manager.
- if (browser_view->browser()->is_app()) {
- ash::wm::GetWindowState(GetNativeWindow())->
- set_can_consume_system_keys(true);
- }
+ window_state->set_can_consume_system_keys(browser_view->browser()->is_app());
#endif // defined(OS_CHROMEOS)
}
« ash/wm/window_state.h ('K') | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698