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

Side by Side Diff: chrome/browser/ui/singleton_tabs.h

Issue 1381633002: Cleanup: IWYU for browser_navigator.h and browser_navigator_params.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix merge conflict Created 5 years, 2 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/settings_window_manager.cc ('k') | chrome/browser/ui/singleton_tabs.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_UI_SINGLETON_TABS_H_ 5 #ifndef CHROME_BROWSER_UI_SINGLETON_TABS_H_
6 #define CHROME_BROWSER_UI_SINGLETON_TABS_H_ 6 #define CHROME_BROWSER_UI_SINGLETON_TABS_H_
7 7
8 #include "chrome/browser/ui/browser_navigator_params.h"
9
8 class Browser; 10 class Browser;
9 class GURL; 11 class GURL;
10 12
11 // Methods for opening "singleton tabs". Tabs are guaranteed unique by varying 13 // Methods for opening "singleton tabs". Tabs are guaranteed unique by varying
12 // metrics within a particular Browser window. 14 // metrics within a particular Browser window.
13 15
14 namespace chrome { 16 namespace chrome {
15 17
16 struct NavigateParams;
17
18 // Core singleton tab API: 18 // Core singleton tab API:
19 19
20 // Show a given a URL. If a tab with the same URL (ignoring the ref) is 20 // Show a given a URL. If a tab with the same URL (ignoring the ref) is
21 // already visible in this browser, it becomes selected. Otherwise a new tab 21 // already visible in this browser, it becomes selected. Otherwise a new tab
22 // is created. 22 // is created.
23 void ShowSingletonTab(Browser* browser, const GURL& url); 23 void ShowSingletonTab(Browser* browser, const GURL& url);
24 24
25 // Same as ShowSingletonTab, but does not ignore ref. 25 // Same as ShowSingletonTab, but does not ignore ref.
26 void ShowSingletonTabRespectRef(Browser* browser, const GURL& url); 26 void ShowSingletonTabRespectRef(Browser* browser, const GURL& url);
27 27
28 // As ShowSingletonTab, but if the current tab is the new tab page or 28 // As ShowSingletonTab, but if the current tab is the new tab page or
29 // about:blank, then overwrite it with the passed contents. 29 // about:blank, then overwrite it with the passed contents.
30 void ShowSingletonTabOverwritingNTP(Browser* browser, 30 void ShowSingletonTabOverwritingNTP(Browser* browser,
31 const NavigateParams& params); 31 const NavigateParams& params);
32 32
33 // Creates a NavigateParams struct for a singleton tab navigation. 33 // Creates a NavigateParams struct for a singleton tab navigation.
34 NavigateParams GetSingletonTabNavigateParams(Browser* browser, const GURL& url); 34 NavigateParams GetSingletonTabNavigateParams(Browser* browser, const GURL& url);
35 35
36 // If the given navigational URL is a Singleton, return the tab index for it. 36 // If the given navigational URL is a Singleton, return the tab index for it.
37 // Otherwise, returns -1. 37 // Otherwise, returns -1.
38 int GetIndexOfSingletonTab(NavigateParams* params); 38 int GetIndexOfSingletonTab(NavigateParams* params);
39 39
40 } // namespace chrome 40 } // namespace chrome
41 41
42 #endif // CHROME_BROWSER_UI_SINGLETON_TABS_H_ 42 #endif // CHROME_BROWSER_UI_SINGLETON_TABS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/settings_window_manager.cc ('k') | chrome/browser/ui/singleton_tabs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698