Chromium Code Reviews| 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/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2312 focus_manager->ClearFocus(); | 2312 focus_manager->ClearFocus(); |
| 2313 } | 2313 } |
| 2314 | 2314 |
| 2315 // Toggle fullscreen mode. | 2315 // Toggle fullscreen mode. |
| 2316 frame_->SetFullscreen(fullscreen); | 2316 frame_->SetFullscreen(fullscreen); |
| 2317 | 2317 |
| 2318 // Enable immersive before the browser refreshes its list of enabled commands. | 2318 // Enable immersive before the browser refreshes its list of enabled commands. |
| 2319 if (ShouldUseImmersiveFullscreenForUrl(url)) | 2319 if (ShouldUseImmersiveFullscreenForUrl(url)) |
| 2320 immersive_mode_controller_->SetEnabled(fullscreen); | 2320 immersive_mode_controller_->SetEnabled(fullscreen); |
| 2321 | 2321 |
| 2322 browser_->WindowFullscreenStateWillChange(); | |
|
Sidney San Martín
2017/02/16 21:32:39
This is a touch awkward. Let me know if you can th
Avi (use Gerrit)
2017/02/16 22:49:22
I'm not familiar enough with Views to say.
| |
| 2322 browser_->WindowFullscreenStateChanged(); | 2323 browser_->WindowFullscreenStateChanged(); |
| 2323 | 2324 |
| 2324 if (fullscreen && !chrome::IsRunningInAppMode()) { | 2325 if (fullscreen && !chrome::IsRunningInAppMode()) { |
| 2325 UpdateExclusiveAccessExitBubbleContent(url, bubble_type); | 2326 UpdateExclusiveAccessExitBubbleContent(url, bubble_type); |
| 2326 } | 2327 } |
| 2327 | 2328 |
| 2328 // Undo our anti-jankiness hacks and force a re-layout. We also need to | 2329 // Undo our anti-jankiness hacks and force a re-layout. We also need to |
| 2329 // recompute the height of the infobar top arrow because toggling in and out | 2330 // recompute the height of the infobar top arrow because toggling in and out |
| 2330 // of fullscreen changes it. Calling ToolbarSizeChanged() will do both these | 2331 // of fullscreen changes it. Calling ToolbarSizeChanged() will do both these |
| 2331 // things since it computes the arrow height directly and forces a layout | 2332 // things since it computes the arrow height directly and forces a layout |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2630 } | 2631 } |
| 2631 | 2632 |
| 2632 extensions::ActiveTabPermissionGranter* | 2633 extensions::ActiveTabPermissionGranter* |
| 2633 BrowserView::GetActiveTabPermissionGranter() { | 2634 BrowserView::GetActiveTabPermissionGranter() { |
| 2634 content::WebContents* web_contents = GetActiveWebContents(); | 2635 content::WebContents* web_contents = GetActiveWebContents(); |
| 2635 if (!web_contents) | 2636 if (!web_contents) |
| 2636 return nullptr; | 2637 return nullptr; |
| 2637 return extensions::TabHelper::FromWebContents(web_contents) | 2638 return extensions::TabHelper::FromWebContents(web_contents) |
| 2638 ->active_tab_permission_granter(); | 2639 ->active_tab_permission_granter(); |
| 2639 } | 2640 } |
| OLD | NEW |