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

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

Issue 176523002: Make the top bar semitransparent when in immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 10 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (show_tab_indicators != browser_view_->tabstrip()->IsImmersiveStyle()) { 161 if (show_tab_indicators != browser_view_->tabstrip()->IsImmersiveStyle()) {
162 browser_view_->tabstrip()->SetImmersiveStyle(show_tab_indicators); 162 browser_view_->tabstrip()->SetImmersiveStyle(show_tab_indicators);
163 return true; 163 return true;
164 } 164 }
165 return false; 165 return false;
166 } 166 }
167 167
168 void ImmersiveModeControllerAsh::OnImmersiveRevealStarted() { 168 void ImmersiveModeControllerAsh::OnImmersiveRevealStarted() {
169 visible_fraction_ = 0; 169 visible_fraction_ = 0;
170 browser_view_->top_container()->SetPaintToLayer(true); 170 browser_view_->top_container()->SetPaintToLayer(true);
171 browser_view_->top_container()->SetFillsBoundsOpaquely(false);
James Cook 2014/02/24 17:40:07 So the top container for *all* immersive fullscree
pkotwicz 2014/02/27 19:26:51 This merely disables some of the optimizations tha
171 UpdateTabIndicators(); 172 UpdateTabIndicators();
172 LayoutBrowserRootView(); 173 LayoutBrowserRootView();
173 FOR_EACH_OBSERVER(Observer, observers_, OnImmersiveRevealStarted()); 174 FOR_EACH_OBSERVER(Observer, observers_, OnImmersiveRevealStarted());
174 } 175 }
175 176
176 void ImmersiveModeControllerAsh::OnImmersiveRevealEnded() { 177 void ImmersiveModeControllerAsh::OnImmersiveRevealEnded() {
177 visible_fraction_ = 0; 178 visible_fraction_ = 0;
178 browser_view_->top_container()->SetPaintToLayer(false); 179 browser_view_->top_container()->SetPaintToLayer(false);
179 UpdateTabIndicators(); 180 UpdateTabIndicators();
180 LayoutBrowserRootView(); 181 LayoutBrowserRootView();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // prevent it from being revealed. 242 // prevent it from being revealed.
242 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> 243 bool in_tab_fullscreen = content::Source<FullscreenController>(source)->
243 IsFullscreenForTabOrPending(); 244 IsFullscreenForTabOrPending();
244 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen( 245 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen(
245 in_tab_fullscreen); 246 in_tab_fullscreen);
246 ash::Shell::GetInstance()->UpdateShelfVisibility(); 247 ash::Shell::GetInstance()->UpdateShelfVisibility();
247 248
248 if (tab_indicator_visibility_changed) 249 if (tab_indicator_visibility_changed)
249 LayoutBrowserRootView(); 250 LayoutBrowserRootView();
250 } 251 }
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698