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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 } | 946 } |
947 | 947 |
948 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); | 948 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); |
949 } | 949 } |
950 | 950 |
951 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) | 951 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) |
952 const { | 952 const { |
953 return IsHtmlApiFullscreen(); | 953 return IsHtmlApiFullscreen(); |
954 } | 954 } |
955 | 955 |
| 956 blink::WebDisplayMode AppWindow::GetDisplayMode( |
| 957 const content::WebContents* source) const { |
| 958 return IsFullscreen() ? blink::WebDisplayModeFullscreen |
| 959 : blink::WebDisplayModeStandalone; |
| 960 } |
| 961 |
956 void AppWindow::OnExtensionUnloaded(BrowserContext* browser_context, | 962 void AppWindow::OnExtensionUnloaded(BrowserContext* browser_context, |
957 const Extension* extension, | 963 const Extension* extension, |
958 UnloadedExtensionInfo::Reason reason) { | 964 UnloadedExtensionInfo::Reason reason) { |
959 if (extension_id_ == extension->id()) | 965 if (extension_id_ == extension->id()) |
960 native_app_window_->Close(); | 966 native_app_window_->Close(); |
961 } | 967 } |
962 | 968 |
963 void AppWindow::OnExtensionWillBeInstalled( | 969 void AppWindow::OnExtensionWillBeInstalled( |
964 BrowserContext* browser_context, | 970 BrowserContext* browser_context, |
965 const Extension* extension, | 971 const Extension* extension, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 region.bounds.x(), | 1098 region.bounds.x(), |
1093 region.bounds.y(), | 1099 region.bounds.y(), |
1094 region.bounds.right(), | 1100 region.bounds.right(), |
1095 region.bounds.bottom(), | 1101 region.bounds.bottom(), |
1096 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1102 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
1097 } | 1103 } |
1098 return sk_region; | 1104 return sk_region; |
1099 } | 1105 } |
1100 | 1106 |
1101 } // namespace extensions | 1107 } // namespace extensions |
OLD | NEW |