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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 gfx::Rect top_container_view_bounds_in_screen( | 205 gfx::Rect top_container_view_bounds_in_screen( |
206 top_container_view_bounds_in_screen_origin, | 206 top_container_view_bounds_in_screen_origin, |
207 top_container_view_bounds.size()); | 207 top_container_view_bounds.size()); |
208 | 208 |
209 std::vector<gfx::Rect> bounds_in_screen; | 209 std::vector<gfx::Rect> bounds_in_screen; |
210 bounds_in_screen.push_back(top_container_view_bounds_in_screen); | 210 bounds_in_screen.push_back(top_container_view_bounds_in_screen); |
211 bounds_in_screen.push_back(find_bar_visible_bounds_in_screen_); | 211 bounds_in_screen.push_back(find_bar_visible_bounds_in_screen_); |
212 return bounds_in_screen; | 212 return bounds_in_screen; |
213 } | 213 } |
214 | 214 |
215 void ImmersiveModeControllerAsh::OnWindowShowTypeChanged( | 215 void ImmersiveModeControllerAsh::OnPostWindowShowTypeChange( |
216 ash::wm::WindowState* window_state, | 216 ash::wm::WindowState* window_state, |
217 ash::wm::WindowShowType old_type) { | 217 ash::wm::WindowShowType old_type) { |
218 // Disable immersive fullscreen when the user exits fullscreen without going | 218 // Disable immersive fullscreen when the user exits fullscreen without going |
219 // through FullscreenController::ToggleFullscreenMode(). This is the case if | 219 // through FullscreenController::ToggleFullscreenMode(). This is the case if |
220 // the user exits fullscreen via the restore button. | 220 // the user exits fullscreen via the restore button. |
221 if (controller_->IsEnabled() && | 221 if (controller_->IsEnabled() && |
222 !window_state->IsFullscreen() && | 222 !window_state->IsFullscreen() && |
223 !window_state->IsMinimized()) { | 223 !window_state->IsMinimized()) { |
224 browser_view_->FullscreenStateChanged(); | 224 browser_view_->FullscreenStateChanged(); |
225 } | 225 } |
(...skipping 15 matching lines...) Expand all Loading... |
241 // prevent it from being revealed. | 241 // prevent it from being revealed. |
242 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> | 242 bool in_tab_fullscreen = content::Source<FullscreenController>(source)-> |
243 IsFullscreenForTabOrPending(); | 243 IsFullscreenForTabOrPending(); |
244 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen( | 244 ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen( |
245 in_tab_fullscreen); | 245 in_tab_fullscreen); |
246 ash::Shell::GetInstance()->UpdateShelfVisibility(); | 246 ash::Shell::GetInstance()->UpdateShelfVisibility(); |
247 | 247 |
248 if (tab_indicator_visibility_changed) | 248 if (tab_indicator_visibility_changed) |
249 LayoutBrowserRootView(); | 249 LayoutBrowserRootView(); |
250 } | 250 } |
OLD | NEW |