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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1323733002: Set display mode for browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated due to review comments. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 72b0ce39095ed78ee8473b798750e3e460c0f5a4..a93c75dc6bb0f1ea7ba119faf87491d352bf7d29 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -107,6 +107,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
+#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h"
#include "chrome/browser/ui/extensions/hosted_app_browser_controller.h"
@@ -1734,6 +1735,17 @@ bool Browser::IsFullscreenForTabOrPending(
->IsFullscreenForTabOrPending(web_contents);
}
+blink::WebDisplayMode Browser::GetDisplayMode(
+ const WebContents* web_contents) const {
+ if (exclusive_access_manager_->context()->IsFullscreen())
sky 2015/09/03 17:57:45 Actually, one question that is now worth asking (I
+ return blink::WebDisplayModeFullscreen;
+
+ if (is_type_popup())
+ return blink::WebDisplayModeStandalone;
+
+ return blink::WebDisplayModeBrowser;
+}
+
void Browser::RegisterProtocolHandler(WebContents* web_contents,
const std::string& protocol,
const GURL& url,
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698