| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/immersive_mode_controller_ash.h" | 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/shared/immersive_revealed_lock.h" | 9 #include "ash/shared/immersive_revealed_lock.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 bool tab_indicator_visibility_changed = UpdateTabIndicators(); | 352 bool tab_indicator_visibility_changed = UpdateTabIndicators(); |
| 353 | 353 |
| 354 // Auto hide the shelf in immersive browser fullscreen. When auto hidden and | 354 // Auto hide the shelf in immersive browser fullscreen. When auto hidden and |
| 355 // Material Design is not enabled, the shelf displays a 3px 'light bar' when | 355 // Material Design is not enabled, the shelf displays a 3px 'light bar' when |
| 356 // it is closed. When in immersive browser fullscreen and tab fullscreen, hide | 356 // it is closed. When in immersive browser fullscreen and tab fullscreen, hide |
| 357 // the shelf completely and prevent it from being revealed. | 357 // the shelf completely and prevent it from being revealed. |
| 358 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> | 358 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> |
| 359 IsWindowFullscreenForTabOrPending(); | 359 IsWindowFullscreenForTabOrPending(); |
| 360 ash::wm::GetWindowState(native_window_) | 360 ash::wm::GetWindowState(native_window_) |
| 361 ->set_shelf_mode_in_fullscreen( | 361 ->set_hide_shelf_when_fullscreen(in_tab_fullscreen); |
| 362 in_tab_fullscreen ? ash::wm::WindowState::SHELF_HIDDEN | |
| 363 : ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE); | |
| 364 ash::Shell::GetInstance()->UpdateShelfVisibility(); | 362 ash::Shell::GetInstance()->UpdateShelfVisibility(); |
| 365 | 363 |
| 366 if (tab_indicator_visibility_changed) | 364 if (tab_indicator_visibility_changed) |
| 367 LayoutBrowserRootView(); | 365 LayoutBrowserRootView(); |
| 368 } | 366 } |
| OLD | NEW |