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

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

Issue 2326703002: Do not show shelf or top chrome hints while in Ash immersive mode (Closed)
Patch Set: address comments Created 4 years, 3 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
OLDNEW
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 widget->non_client_view()->frame_view()->ResetWindowControls(); 195 widget->non_client_view()->frame_view()->ResetWindowControls();
196 widget->non_client_view()->frame_view()->InvalidateLayout(); 196 widget->non_client_view()->frame_view()->InvalidateLayout();
197 browser_view_->InvalidateLayout(); 197 browser_view_->InvalidateLayout();
198 widget->GetRootView()->Layout(); 198 widget->GetRootView()->Layout();
199 } 199 }
200 200
201 // TODO(yiyix|tdanderson): Once Chrome OS material design is enabled by default, 201 // TODO(yiyix|tdanderson): Once Chrome OS material design is enabled by default,
202 // remove all code related to immersive mode hints (here, in TabStrip and 202 // remove all code related to immersive mode hints (here, in TabStrip and
203 // BrowserNonClientFrameViewAsh::OnPaint()). See crbug.com/614453. 203 // BrowserNonClientFrameViewAsh::OnPaint()). See crbug.com/614453.
204 bool ImmersiveModeControllerAsh::UpdateTabIndicators() { 204 bool ImmersiveModeControllerAsh::UpdateTabIndicators() {
205 if (ash::MaterialDesignController::IsShelfMaterial()) 205 if (ash::MaterialDesignController::IsImmersiveModeMaterial())
206 return false; 206 return false;
207 207
208 bool has_tabstrip = browser_view_->IsBrowserTypeNormal(); 208 bool has_tabstrip = browser_view_->IsBrowserTypeNormal();
209 if (!IsEnabled() || !has_tabstrip) { 209 if (!IsEnabled() || !has_tabstrip) {
210 use_tab_indicators_ = false; 210 use_tab_indicators_ = false;
211 } else { 211 } else {
212 bool in_tab_fullscreen = browser_view_->browser() 212 bool in_tab_fullscreen = browser_view_->browser()
213 ->exclusive_access_manager() 213 ->exclusive_access_manager()
214 ->fullscreen_controller() 214 ->fullscreen_controller()
215 ->IsWindowFullscreenForTabOrPending(); 215 ->IsWindowFullscreenForTabOrPending();
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 IsWindowFullscreenForTabOrPending(); 359 IsWindowFullscreenForTabOrPending();
360 ash::wm::GetWindowState(native_window_) 360 ash::wm::GetWindowState(native_window_)
361 ->set_shelf_mode_in_fullscreen( 361 ->set_shelf_mode_in_fullscreen(
362 in_tab_fullscreen ? ash::wm::WindowState::SHELF_HIDDEN 362 in_tab_fullscreen ? ash::wm::WindowState::SHELF_HIDDEN
363 : ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE); 363 : ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE);
364 ash::Shell::GetInstance()->UpdateShelfVisibility(); 364 ash::Shell::GetInstance()->UpdateShelfVisibility();
365 365
366 if (tab_indicator_visibility_changed) 366 if (tab_indicator_visibility_changed)
367 LayoutBrowserRootView(); 367 LayoutBrowserRootView();
368 } 368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698