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

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

Issue 144443003: Unify desktop and Android tab helper instantiation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing WindowAndroidHelper Created 6 years, 10 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_navigator.cc ('k') | chrome/browser/ui/browser_tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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_TAB_CONTENTS_H_
6 #define CHROME_BROWSER_UI_BROWSER_TAB_CONTENTS_H_
7
8 class Browser;
9
10 namespace content {
11 class WebContents;
12 }
13
14 namespace chrome {
15 class BrowserTabStripModelDelegate;
16 }
17
18 namespace prerender {
19 class PrerenderContents;
20 }
21
22 // A "tab contents" is a WebContents that is used as a tab in a browser
23 // window, and thus is owned by a Browser's TabStripModel. The
24 // BrowserTabContents class allows specific classes to attach the set of tab
25 // helpers that is used for tab contents.
26 //
27 // TODO(avi): This list is rather large, and for most callers it's due to the
28 // fact that they need tab helpers attached early to deal with arbitrary
29 // content loaded into a WebContents that will later be added to the tabstrip.
30 // Is there a better way to handle this? (Ideally, this list would contain
31 // only Browser and BrowserTabStripModelDelegate.)
32 class BrowserTabContents {
33 private:
34 // Browser and its TabStripModelDelegate have intimate control of tabs.
35 // TabAndroid is the equivalent on Android.
36 friend class Browser;
37 friend class chrome::BrowserTabStripModelDelegate;
38 friend class TabAndroid;
39
40 // chrome::Navigate creates WebContents that are destined for the tab strip,
41 // and that might have WebUI that immediately calls back into random tab
42 // helpers.
43 friend class BrowserNavigatorWebContentsAdoption;
44
45 // Prerendering loads pages that have arbitrary external content; it needs
46 // the full set of tab helpers to deal with it.
47 friend class prerender::PrerenderContents;
48
49 // Adopts the specified WebContents as a full-fledged browser tab, attaching
50 // all the associated tab helpers that are needed for the WebContents to
51 // serve in that role. It is safe to call this on a WebContents that was
52 // already adopted.
53 static void AttachTabHelpers(content::WebContents* web_contents);
54 };
55
56 #endif // CHROME_BROWSER_UI_BROWSER_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/browser_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698