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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.cc ('k') | chrome/browser/ui/browser_tabstrip.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
7 #pragma once
8
9 #include "content/public/common/page_transition_types.h"
10 #include "webkit/glue/window_open_disposition.h"
11
12 class Browser;
13 class GURL;
14 class Profile;
15 class TabContents;
16
17 namespace content {
18 class SessionStorageNamespace;
19 class SiteInstance;
20 class WebContents;
21 }
22
23 namespace gfx {
24 class Rect;
25 }
26
27 namespace chrome {
28
29 int GetIndexOfTab(const Browser* browser, const content::WebContents* contents);
30
31 TabContents* GetActiveTabContents(const Browser* browser);
32 content::WebContents* GetActiveWebContents(const Browser* browser);
33
34 TabContents* GetTabContentsAt(const Browser* browser, int index);
35 content::WebContents* GetWebContentsAt(const Browser* browser, int index);
36
37 void ActivateTabAt(Browser* browser, int index, bool user_gesture);
38
39 // Used by extensions.
40 bool IsTabStripEditable(Browser* browser);
41
42 // Adds a selected tab with the specified URL and transition, returns the
43 // created TabContents.
44 TabContents* AddSelectedTabWithURL(Browser* browser,
45 const GURL& url,
46 content::PageTransition transition);
47
48 // Adds |tab_contents| to |browser|'s tabstrip.
49 void AddTab(Browser* browser,
50 TabContents* tab_contents,
51 content::PageTransition type);
52
53 // Creates a new tab with the already-created WebContents 'new_contents'.
54 // The window for the added contents will be reparented correctly when this
55 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the
56 // initial position.
57 void AddWebContents(Browser* browser,
58 content::WebContents* source_contents,
59 content::WebContents* new_contents,
60 WindowOpenDisposition disposition,
61 const gfx::Rect& initial_pos,
62 bool user_gesture);
63 void CloseWebContents(Browser* browser, content::WebContents* contents);
64
65 void CloseAllTabs(Browser* browser);
66
67 // Centralized method for creating a TabContents, configuring and
68 // installing all its supporting objects and observers.
69 TabContents* TabContentsFactory(
70 Profile* profile,
71 content::SiteInstance* site_instance,
72 int routing_id,
73 const content::WebContents* base_web_contents,
74 content::SessionStorageNamespace* session_storage_namespace);
75
76 } // namespace chrome
77
78 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.cc ('k') | chrome/browser/ui/browser_tabstrip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698