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 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 const NavigationEntry* pending_entry = | 1706 const NavigationEntry* pending_entry = |
1707 web_contents->GetController().GetPendingEntry(); | 1707 web_contents->GetController().GetPendingEntry(); |
1708 if (pending_entry && | 1708 if (pending_entry && |
1709 !chrome::IsNTPURL(pending_entry->GetVirtualURL(), profile_)) { | 1709 !chrome::IsNTPURL(pending_entry->GetVirtualURL(), profile_)) { |
1710 size.Enlarge( | 1710 size.Enlarge( |
1711 0, window()->GetRenderViewHeightInsetWithDetachedBookmarkBar()); | 1711 0, window()->GetRenderViewHeightInsetWithDetachedBookmarkBar()); |
1712 } | 1712 } |
1713 return size; | 1713 return size; |
1714 } | 1714 } |
1715 | 1715 |
| 1716 void Browser::RequestPresentationMode() { |
| 1717 fullscreen_controller_->TogglePresentationMode(); |
| 1718 } |
| 1719 |
1716 /////////////////////////////////////////////////////////////////////////////// | 1720 /////////////////////////////////////////////////////////////////////////////// |
1717 // Browser, CoreTabHelperDelegate implementation: | 1721 // Browser, CoreTabHelperDelegate implementation: |
1718 | 1722 |
1719 void Browser::SwapTabContents(content::WebContents* old_contents, | 1723 void Browser::SwapTabContents(content::WebContents* old_contents, |
1720 content::WebContents* new_contents) { | 1724 content::WebContents* new_contents) { |
1721 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); | 1725 int index = tab_strip_model_->GetIndexOfWebContents(old_contents); |
1722 DCHECK_NE(TabStripModel::kNoTab, index); | 1726 DCHECK_NE(TabStripModel::kNoTab, index); |
1723 tab_strip_model_->ReplaceWebContentsAt(index, new_contents); | 1727 tab_strip_model_->ReplaceWebContentsAt(index, new_contents); |
1724 } | 1728 } |
1725 | 1729 |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 if (contents && !allow_js_access) { | 2302 if (contents && !allow_js_access) { |
2299 contents->web_contents()->GetController().LoadURL( | 2303 contents->web_contents()->GetController().LoadURL( |
2300 target_url, | 2304 target_url, |
2301 content::Referrer(), | 2305 content::Referrer(), |
2302 content::PAGE_TRANSITION_LINK, | 2306 content::PAGE_TRANSITION_LINK, |
2303 std::string()); // No extra headers. | 2307 std::string()); // No extra headers. |
2304 } | 2308 } |
2305 | 2309 |
2306 return contents != NULL; | 2310 return contents != NULL; |
2307 } | 2311 } |
OLD | NEW |