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

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

Issue 2368653002: Remove pre-MD code from browser/ui/views/tabs/tab.cc (Closed)
Patch Set: fix compile 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::IsImmersiveModeMaterial())
tdanderson 2016/09/23 21:57:09 MD immersive mode was turned on in early 55 which
Evan Stade 2016/09/26 16:40:39 ah ok, my bad.
206 return false;
207
208 bool has_tabstrip = browser_view_->IsBrowserTypeNormal();
209 if (!IsEnabled() || !has_tabstrip) {
210 use_tab_indicators_ = false;
211 } else {
212 bool in_tab_fullscreen = browser_view_->browser()
213 ->exclusive_access_manager()
214 ->fullscreen_controller()
215 ->IsWindowFullscreenForTabOrPending();
216 use_tab_indicators_ = !in_tab_fullscreen;
217 }
218
219 bool show_tab_indicators = use_tab_indicators_ && !IsRevealed();
220 if (show_tab_indicators != browser_view_->tabstrip()->IsImmersiveStyle()) {
221 browser_view_->tabstrip()->SetImmersiveStyle(show_tab_indicators);
222 return true;
223 }
224 return false; 205 return false;
225 } 206 }
226 207
227 void ImmersiveModeControllerAsh::CreateMashRevealWidget() { 208 void ImmersiveModeControllerAsh::CreateMashRevealWidget() {
228 if (!chrome::IsRunningInMash()) 209 if (!chrome::IsRunningInMash())
229 return; 210 return;
230 211
231 DCHECK(!mash_reveal_widget_); 212 DCHECK(!mash_reveal_widget_);
232 mash_reveal_widget_.reset(new views::Widget); 213 mash_reveal_widget_.reset(new views::Widget);
233 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_POPUP); 214 views::Widget::InitParams init_params(views::Widget::InitParams::TYPE_POPUP);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 IsWindowFullscreenForTabOrPending(); 340 IsWindowFullscreenForTabOrPending();
360 ash::wm::GetWindowState(native_window_) 341 ash::wm::GetWindowState(native_window_)
361 ->set_shelf_mode_in_fullscreen( 342 ->set_shelf_mode_in_fullscreen(
362 in_tab_fullscreen ? ash::wm::WindowState::SHELF_HIDDEN 343 in_tab_fullscreen ? ash::wm::WindowState::SHELF_HIDDEN
363 : ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE); 344 : ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE);
364 ash::Shell::GetInstance()->UpdateShelfVisibility(); 345 ash::Shell::GetInstance()->UpdateShelfVisibility();
365 346
366 if (tab_indicator_visibility_changed) 347 if (tab_indicator_visibility_changed)
367 LayoutBrowserRootView(); 348 LayoutBrowserRootView();
368 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698