| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 void ImmersiveModeControllerAsh::OnImmersiveRevealStarted() { | 266 void ImmersiveModeControllerAsh::OnImmersiveRevealStarted() { |
| 267 DestroyMashRevealWidget(); | 267 DestroyMashRevealWidget(); |
| 268 | 268 |
| 269 visible_fraction_ = 0; | 269 visible_fraction_ = 0; |
| 270 browser_view_->top_container()->SetPaintToLayer(true); | 270 browser_view_->top_container()->SetPaintToLayer(true); |
| 271 browser_view_->top_container()->layer()->SetFillsBoundsOpaquely(false); | 271 browser_view_->top_container()->layer()->SetFillsBoundsOpaquely(false); |
| 272 UpdateTabIndicators(); | 272 UpdateTabIndicators(); |
| 273 LayoutBrowserRootView(); | 273 LayoutBrowserRootView(); |
| 274 CreateMashRevealWidget(); | 274 CreateMashRevealWidget(); |
| 275 FOR_EACH_OBSERVER(Observer, observers_, OnImmersiveRevealStarted()); | 275 for (Observer& observer : observers_) |
| 276 observer.OnImmersiveRevealStarted(); |
| 276 } | 277 } |
| 277 | 278 |
| 278 void ImmersiveModeControllerAsh::OnImmersiveRevealEnded() { | 279 void ImmersiveModeControllerAsh::OnImmersiveRevealEnded() { |
| 279 DestroyMashRevealWidget(); | 280 DestroyMashRevealWidget(); |
| 280 visible_fraction_ = 0; | 281 visible_fraction_ = 0; |
| 281 browser_view_->top_container()->SetPaintToLayer(false); | 282 browser_view_->top_container()->SetPaintToLayer(false); |
| 282 UpdateTabIndicators(); | 283 UpdateTabIndicators(); |
| 283 LayoutBrowserRootView(); | 284 LayoutBrowserRootView(); |
| 284 } | 285 } |
| 285 | 286 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // the shelf completely and prevent it from being revealed. | 358 // the shelf completely and prevent it from being revealed. |
| 358 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> | 359 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> |
| 359 IsWindowFullscreenForTabOrPending(); | 360 IsWindowFullscreenForTabOrPending(); |
| 360 ash::wm::GetWindowState(native_window_) | 361 ash::wm::GetWindowState(native_window_) |
| 361 ->set_hide_shelf_when_fullscreen(in_tab_fullscreen); | 362 ->set_hide_shelf_when_fullscreen(in_tab_fullscreen); |
| 362 ash::Shell::GetInstance()->UpdateShelfVisibility(); | 363 ash::Shell::GetInstance()->UpdateShelfVisibility(); |
| 363 | 364 |
| 364 if (tab_indicator_visibility_changed) | 365 if (tab_indicator_visibility_changed) |
| 365 LayoutBrowserRootView(); | 366 LayoutBrowserRootView(); |
| 366 } | 367 } |
| OLD | NEW |