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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |