| OLD | NEW |
| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // Turn on auto window management if we don't need an explicit bounds. | 67 // Turn on auto window management if we don't need an explicit bounds. |
| 68 // This way the requested bounds are honored. | 68 // This way the requested bounds are honored. |
| 69 if (!browser->bounds_overridden() && !browser->is_session_restore()) | 69 if (!browser->bounds_overridden() && !browser->is_session_restore()) |
| 70 SetWindowAutoManaged(); | 70 SetWindowAutoManaged(); |
| 71 #if defined(OS_CHROMEOS) | 71 #if defined(OS_CHROMEOS) |
| 72 if (browser->is_type_tabbed()) { | 72 if (browser->is_type_tabbed()) { |
| 73 // Animating to immersive fullscreen does not look good. Immersive | 73 // Animating to immersive fullscreen does not look good. Immersive |
| 74 // fullscreen is the default fullscreen type on ChromeOS for tabbed browser | 74 // fullscreen is the default fullscreen type on ChromeOS for tabbed browser |
| 75 // windows. The WindowState constructor disables animating to fullscreen | 75 // windows. The WindowState constructor disables animating to fullscreen |
| 76 // completely when the kAshEnableImmersiveFullscreenForAllWindows command | 76 // completely when switches::UseImmersiveFullscreenForAllWindows() returns |
| 77 // line flag is set. | 77 // true. |
| 78 window_state->set_animate_to_fullscreen(false); | 78 window_state->set_animate_to_fullscreen(false); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys | 81 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys |
| 82 // like brightness, volume, etc. Otherwise these keys are handled by the | 82 // like brightness, volume, etc. Otherwise these keys are handled by the |
| 83 // Ash window manager. | 83 // Ash window manager. |
| 84 window_state->set_can_consume_system_keys(browser->is_app()); | 84 window_state->set_can_consume_system_keys(browser->is_app()); |
| 85 #endif // defined(OS_CHROMEOS) | 85 #endif // defined(OS_CHROMEOS) |
| 86 } | 86 } |
| 87 | 87 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 /////////////////////////////////////////////////////////////////////////////// | 122 /////////////////////////////////////////////////////////////////////////////// |
| 123 // BrowserFrameAsh, private: | 123 // BrowserFrameAsh, private: |
| 124 | 124 |
| 125 void BrowserFrameAsh::SetWindowAutoManaged() { | 125 void BrowserFrameAsh::SetWindowAutoManaged() { |
| 126 if (browser_view_->browser()->type() != Browser::TYPE_POPUP || | 126 if (browser_view_->browser()->type() != Browser::TYPE_POPUP || |
| 127 browser_view_->browser()->is_app()) { | 127 browser_view_->browser()->is_app()) { |
| 128 ash::wm::GetWindowState(GetNativeWindow())-> | 128 ash::wm::GetWindowState(GetNativeWindow())-> |
| 129 set_window_position_managed(true); | 129 set_window_position_managed(true); |
| 130 } | 130 } |
| 131 } | 131 } |
| OLD | NEW |