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

Unified Diff: chrome/browser/browser.h

Issue 2747011: Further refine the pinned tab navigation algorithm. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: comments Created 10 years, 6 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 | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.h
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 6f4ef760fb5c6578a67cfb5ee14908e2830d073b..9939c2b21b5fcb8e28ee0d4e9c66595d071c4969 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -24,6 +24,7 @@
#include "chrome/browser/toolbar_model.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_registrar.h"
+#include "chrome/common/page_transition_types.h"
#include "chrome/common/page_zoom.h"
#include "gfx/rect.h"
@@ -608,6 +609,7 @@ class Browser : public TabStripModelDelegate,
virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
private:
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, PinnedTabDisposition);
FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
// Used to describe why a tab is being detached. This is used by
@@ -913,6 +915,17 @@ class Browser : public TabStripModelDelegate,
bool SupportsWindowFeatureImpl(WindowFeature feature,
bool check_fullscreen) const;
+ // Calculate a new window open disposition for a navigation. The return
+ // value will usually be |original_disposition|, but for some pinned tab cases
+ // we change it to NEW_FOREGROUND_TAB so that the pinned tab feels more
+ // permanent.
+ static WindowOpenDisposition AdjustWindowOpenDispositionForTab(
+ bool is_pinned,
+ const GURL& url,
+ const GURL& referrer,
+ PageTransition::Type transition,
+ WindowOpenDisposition original_disposition);
+
// Data members /////////////////////////////////////////////////////////////
NotificationRegistrar registrar_;
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698