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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 98523003: Implement "presentation" feature for window.open() Base URL: https://github.com/drott/cameo.git@presentationWindowSquashed
Patch Set: Created 7 years 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_navigator.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 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698