Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 964403003: Make it possible to set the display mode from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« content/renderer/render_view_impl.cc ('K') | « extensions/browser/app_window/app_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698