| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 } | 957 } |
| 958 | 958 |
| 959 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); | 959 SetFullscreen(FULLSCREEN_TYPE_HTML_API, enter_fullscreen); |
| 960 } | 960 } |
| 961 | 961 |
| 962 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) | 962 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) |
| 963 const { | 963 const { |
| 964 return IsHtmlApiFullscreen(); | 964 return IsHtmlApiFullscreen(); |
| 965 } | 965 } |
| 966 | 966 |
| 967 blink::WebDisplayMode AppWindow::GetDisplayMode( |
| 968 const content::WebContents* source) const { |
| 969 if (IsFullscreen() && !IsHtmlApiFullscreen()) |
| 970 return blink::WebDisplayModeFullscreen; |
| 971 return blink::WebDisplayModeStandalone; |
| 972 } |
| 973 |
| 967 void AppWindow::Observe(int type, | 974 void AppWindow::Observe(int type, |
| 968 const content::NotificationSource& source, | 975 const content::NotificationSource& source, |
| 969 const content::NotificationDetails& details) { | 976 const content::NotificationDetails& details) { |
| 970 switch (type) { | 977 switch (type) { |
| 971 case NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: { | 978 case NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: { |
| 972 const Extension* unloaded_extension = | 979 const Extension* unloaded_extension = |
| 973 content::Details<UnloadedExtensionInfo>(details)->extension; | 980 content::Details<UnloadedExtensionInfo>(details)->extension; |
| 974 if (extension_id_ == unloaded_extension->id()) | 981 if (extension_id_ == unloaded_extension->id()) |
| 975 native_app_window_->Close(); | 982 native_app_window_->Close(); |
| 976 break; | 983 break; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 region.bounds.x(), | 1118 region.bounds.x(), |
| 1112 region.bounds.y(), | 1119 region.bounds.y(), |
| 1113 region.bounds.right(), | 1120 region.bounds.right(), |
| 1114 region.bounds.bottom(), | 1121 region.bounds.bottom(), |
| 1115 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1122 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1116 } | 1123 } |
| 1117 return sk_region; | 1124 return sk_region; |
| 1118 } | 1125 } |
| 1119 | 1126 |
| 1120 } // namespace extensions | 1127 } // namespace extensions |
| OLD | NEW |