| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |