| 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 } | 883 } |
| 884 | 884 |
| 885 void BrowserView::Minimize() { | 885 void BrowserView::Minimize() { |
| 886 frame_->Minimize(); | 886 frame_->Minimize(); |
| 887 } | 887 } |
| 888 | 888 |
| 889 void BrowserView::Restore() { | 889 void BrowserView::Restore() { |
| 890 frame_->Restore(); | 890 frame_->Restore(); |
| 891 } | 891 } |
| 892 | 892 |
| 893 void BrowserView::SetFullscreen(bool fullscreen) { |
| 894 if (fullscreen) |
| 895 EnterFullscreen(GURL(), EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE); |
| 896 else |
| 897 ExitFullscreen(); |
| 898 } |
| 899 |
| 893 void BrowserView::EnterFullscreen(const GURL& url, | 900 void BrowserView::EnterFullscreen(const GURL& url, |
| 894 ExclusiveAccessBubbleType bubble_type) { | 901 ExclusiveAccessBubbleType bubble_type) { |
| 895 if (IsFullscreen()) | 902 if (IsFullscreen()) |
| 896 return; // Nothing to do. | 903 return; // Nothing to do. |
| 897 | 904 |
| 898 ProcessFullscreen(true, url, bubble_type); | 905 ProcessFullscreen(true, url, bubble_type); |
| 899 } | 906 } |
| 900 | 907 |
| 901 void BrowserView::ExitFullscreen() { | 908 void BrowserView::ExitFullscreen() { |
| 902 if (!IsFullscreen()) | 909 if (!IsFullscreen()) |
| (...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2672 } | 2679 } |
| 2673 | 2680 |
| 2674 extensions::ActiveTabPermissionGranter* | 2681 extensions::ActiveTabPermissionGranter* |
| 2675 BrowserView::GetActiveTabPermissionGranter() { | 2682 BrowserView::GetActiveTabPermissionGranter() { |
| 2676 content::WebContents* web_contents = GetActiveWebContents(); | 2683 content::WebContents* web_contents = GetActiveWebContents(); |
| 2677 if (!web_contents) | 2684 if (!web_contents) |
| 2678 return nullptr; | 2685 return nullptr; |
| 2679 return extensions::TabHelper::FromWebContents(web_contents) | 2686 return extensions::TabHelper::FromWebContents(web_contents) |
| 2680 ->active_tab_permission_granter(); | 2687 ->active_tab_permission_granter(); |
| 2681 } | 2688 } |
| OLD | NEW |