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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_ash.cc

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some issues with shelf visibility and desktop fullscreen. Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h"
6 6
7 #include "ash/wm/window_state.h" 7 #include "ash/wm/window_state.h"
8 #include "ash/wm/window_state_delegate.h" 8 #include "ash/wm/window_state_delegate.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ash::wm::WindowState* window_state = 62 ash::wm::WindowState* window_state =
63 ash::wm::GetWindowState(GetNativeWindow()); 63 ash::wm::GetWindowState(GetNativeWindow());
64 window_state->SetDelegate( 64 window_state->SetDelegate(
65 scoped_ptr<ash::wm::WindowStateDelegate>( 65 scoped_ptr<ash::wm::WindowStateDelegate>(
66 new BrowserWindowStateDelegate(browser)).Pass()); 66 new BrowserWindowStateDelegate(browser)).Pass());
67 67
68 // Turn on auto window management if we don't need an explicit bounds. 68 // Turn on auto window management if we don't need an explicit bounds.
69 // This way the requested bounds are honored. 69 // This way the requested bounds are honored.
70 if (!browser->bounds_overridden() && !browser->is_session_restore()) 70 if (!browser->bounds_overridden() && !browser->is_session_restore())
71 SetWindowAutoManaged(); 71 SetWindowAutoManaged();
72 #if defined(OS_CHROMEOS)
73 if (browser->is_type_tabbed()) { 72 if (browser->is_type_tabbed()) {
74 // Animating to immersive fullscreen does not look good. Immersive 73 // Animating to immersive fullscreen does not look good. Immersive
75 // fullscreen is the default fullscreen type on ChromeOS for tabbed browser 74 // fullscreen is the default fullscreen type on ChromeOS for tabbed browser
76 // windows. The WindowState constructor disables animating to fullscreen 75 // windows. The WindowState constructor disables animating to fullscreen
77 // completely when switches::UseImmersiveFullscreenForAllWindows() returns 76 // completely when switches::UseImmersiveFullscreenForAllWindows() returns
78 // true. 77 // true.
79 window_state->set_animate_to_fullscreen(false); 78 window_state->set_animate_to_fullscreen(false);
80 } 79 }
81 80
81 #if defined(OS_CHROMEOS)
82 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys 82 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys
83 // like brightness, volume, etc. Otherwise these keys are handled by the 83 // like brightness, volume, etc. Otherwise these keys are handled by the
84 // Ash window manager. 84 // Ash window manager.
85 window_state->set_can_consume_system_keys(browser->is_app()); 85 window_state->set_can_consume_system_keys(browser->is_app());
86 #endif // defined(OS_CHROMEOS) 86 #endif // defined(OS_CHROMEOS)
87 } 87 }
88 88
89 /////////////////////////////////////////////////////////////////////////////// 89 ///////////////////////////////////////////////////////////////////////////////
90 // BrowserFrameAsh, views::NativeWidgetAura overrides: 90 // BrowserFrameAsh, views::NativeWidgetAura overrides:
91 91
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 /////////////////////////////////////////////////////////////////////////////// 131 ///////////////////////////////////////////////////////////////////////////////
132 // BrowserFrameAsh, private: 132 // BrowserFrameAsh, private:
133 133
134 void BrowserFrameAsh::SetWindowAutoManaged() { 134 void BrowserFrameAsh::SetWindowAutoManaged() {
135 if (browser_view_->browser()->type() != Browser::TYPE_POPUP || 135 if (browser_view_->browser()->type() != Browser::TYPE_POPUP ||
136 browser_view_->browser()->is_app()) { 136 browser_view_->browser()->is_app()) {
137 ash::wm::GetWindowState(GetNativeWindow())-> 137 ash::wm::GetWindowState(GetNativeWindow())->
138 set_window_position_managed(true); 138 set_window_position_managed(true);
139 } 139 }
140 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698