| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/app_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 ToggleFullscreenModeForTab(source, false); | 919 ToggleFullscreenModeForTab(source, false); |
| 920 } | 920 } |
| 921 | 921 |
| 922 void AppWindow::ToggleFullscreenModeForTab(content::WebContents* source, | 922 void AppWindow::ToggleFullscreenModeForTab(content::WebContents* source, |
| 923 bool enter_fullscreen) { | 923 bool enter_fullscreen) { |
| 924 const Extension* extension = GetExtension(); | 924 const Extension* extension = GetExtension(); |
| 925 if (!extension) | 925 if (!extension) |
| 926 return; | 926 return; |
| 927 | 927 |
| 928 if (!IsExtensionWithPermissionOrSuggestInConsole( | 928 if (!IsExtensionWithPermissionOrSuggestInConsole( |
| 929 APIPermission::kFullscreen, extension, source->GetRenderViewHost())) { | 929 APIPermission::kFullscreen, extension, source->GetMainFrame())) { |
| 930 return; | 930 return; |
| 931 } | 931 } |
| 932 | 932 |
| 933 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); | 933 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); |
| 934 } | 934 } |
| 935 | 935 |
| 936 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) | 936 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) |
| 937 const { | 937 const { |
| 938 return IsHtmlApiFullscreen(); | 938 return IsHtmlApiFullscreen(); |
| 939 } | 939 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 region.bounds.x(), | 1090 region.bounds.x(), |
| 1091 region.bounds.y(), | 1091 region.bounds.y(), |
| 1092 region.bounds.right(), | 1092 region.bounds.right(), |
| 1093 region.bounds.bottom(), | 1093 region.bounds.bottom(), |
| 1094 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1094 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1095 } | 1095 } |
| 1096 return sk_region; | 1096 return sk_region; |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 } // namespace extensions | 1099 } // namespace extensions |
| OLD | NEW |