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

Side by Side 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: Removed unneeded include. Created 5 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab( 1727 exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
1728 web_contents); 1728 web_contents);
1729 } 1729 }
1730 1730
1731 bool Browser::IsFullscreenForTabOrPending( 1731 bool Browser::IsFullscreenForTabOrPending(
1732 const WebContents* web_contents) const { 1732 const WebContents* web_contents) const {
1733 return exclusive_access_manager_->fullscreen_controller() 1733 return exclusive_access_manager_->fullscreen_controller()
1734 ->IsFullscreenForTabOrPending(web_contents); 1734 ->IsFullscreenForTabOrPending(web_contents);
1735 } 1735 }
1736 1736
1737 blink::WebDisplayMode Browser::GetDisplayMode(
1738 const WebContents* web_contents) const {
1739 if (window_->IsFullscreen())
1740 return blink::WebDisplayModeFullscreen;
1741
1742 if (is_type_popup())
1743 return blink::WebDisplayModeStandalone;
1744
1745 return blink::WebDisplayModeBrowser;
1746 }
1747
1737 void Browser::RegisterProtocolHandler(WebContents* web_contents, 1748 void Browser::RegisterProtocolHandler(WebContents* web_contents,
1738 const std::string& protocol, 1749 const std::string& protocol,
1739 const GURL& url, 1750 const GURL& url,
1740 bool user_gesture) { 1751 bool user_gesture) {
1741 content::BrowserContext* context = web_contents->GetBrowserContext(); 1752 content::BrowserContext* context = web_contents->GetBrowserContext();
1742 if (context->IsOffTheRecord()) 1753 if (context->IsOffTheRecord())
1743 return; 1754 return;
1744 1755
1745 ProtocolHandler handler = 1756 ProtocolHandler handler =
1746 ProtocolHandler::CreateProtocolHandler(protocol, url); 1757 ProtocolHandler::CreateProtocolHandler(protocol, url);
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 if (contents && !allow_js_access) { 2650 if (contents && !allow_js_access) {
2640 contents->web_contents()->GetController().LoadURL( 2651 contents->web_contents()->GetController().LoadURL(
2641 target_url, 2652 target_url,
2642 content::Referrer(), 2653 content::Referrer(),
2643 ui::PAGE_TRANSITION_LINK, 2654 ui::PAGE_TRANSITION_LINK,
2644 std::string()); // No extra headers. 2655 std::string()); // No extra headers.
2645 } 2656 }
2646 2657
2647 return contents != NULL; 2658 return contents != NULL;
2648 } 2659 }
OLDNEW
« 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