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

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

Issue 59043013: Add flag to enable immersive fullscreen for v2 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 void ImmersiveModeControllerAsh::SetVisibleFraction(double visible_fraction) { 203 void ImmersiveModeControllerAsh::SetVisibleFraction(double visible_fraction) {
204 if (visible_fraction_ != visible_fraction) { 204 if (visible_fraction_ != visible_fraction) {
205 visible_fraction_ = visible_fraction; 205 visible_fraction_ = visible_fraction;
206 browser_view_->Layout(); 206 browser_view_->Layout();
207 } 207 }
208 } 208 }
209 209
210 std::vector<gfx::Rect> 210 std::vector<gfx::Rect>
211 ImmersiveModeControllerAsh::GetVisibleBoundsInScreen() { 211 ImmersiveModeControllerAsh::GetVisibleBoundsInScreen() const {
212 views::View* top_container_view = browser_view_->top_container(); 212 views::View* top_container_view = browser_view_->top_container();
213 gfx::Rect top_container_view_bounds = top_container_view->GetVisibleBounds(); 213 gfx::Rect top_container_view_bounds = top_container_view->GetVisibleBounds();
214 // TODO(tdanderson): Implement View::ConvertRectToScreen(). 214 // TODO(tdanderson): Implement View::ConvertRectToScreen().
215 gfx::Point top_container_view_bounds_in_screen_origin( 215 gfx::Point top_container_view_bounds_in_screen_origin(
216 top_container_view_bounds.origin()); 216 top_container_view_bounds.origin());
217 views::View::ConvertPointToScreen(top_container_view, 217 views::View::ConvertPointToScreen(top_container_view,
218 &top_container_view_bounds_in_screen_origin); 218 &top_container_view_bounds_in_screen_origin);
219 gfx::Rect top_container_view_bounds_in_screen( 219 gfx::Rect top_container_view_bounds_in_screen(
220 top_container_view_bounds_in_screen_origin, 220 top_container_view_bounds_in_screen_origin,
221 top_container_view_bounds.size()); 221 top_container_view_bounds.size());
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // shelf displays a 3px 'light bar' when it is closed. When in immersive 258 // shelf displays a 3px 'light bar' when it is closed. When in immersive
259 // browser fullscreen and tab fullscreen, hide the shelf completely and 259 // browser fullscreen and tab fullscreen, hide the shelf completely and
260 // prevent it from being revealed. 260 // prevent it from being revealed.
261 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen( 261 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen(
262 in_tab_fullscreen); 262 in_tab_fullscreen);
263 ash::Shell::GetInstance()->UpdateShelfVisibility(); 263 ash::Shell::GetInstance()->UpdateShelfVisibility();
264 264
265 if (use_tab_indicators_ != used_tab_indicators) 265 if (use_tab_indicators_ != used_tab_indicators)
266 LayoutBrowserRootView(); 266 LayoutBrowserRootView();
267 } 267 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller_ash.h ('k') | ui/views/widget/widget_deletion_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698