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

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

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 years, 7 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/browser_tab_strip_model_delegate.cc ('k') | chrome/browser/ui/tab_helpers.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 2014 The Chromium Authors. All rights reserved. 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 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_TAB_HELPERS_H_ 5 #ifndef CHROME_BROWSER_UI_TAB_HELPERS_H_
6 #define CHROME_BROWSER_UI_TAB_HELPERS_H_ 6 #define CHROME_BROWSER_UI_TAB_HELPERS_H_
7 7
8 #include "base/optional.h"
9 #include "content/public/browser/web_contents.h"
10
8 namespace android { 11 namespace android {
9 class TabWebContentsDelegateAndroid; 12 class TabWebContentsDelegateAndroid;
10 } 13 }
11 14
12 namespace content {
13 class WebContents;
14 }
15
16 namespace chrome { 15 namespace chrome {
17 class BrowserTabStripModelDelegate; 16 class BrowserTabStripModelDelegate;
18 } 17 }
19 18
20 namespace prerender { 19 namespace prerender {
21 class PrerenderContents; 20 class PrerenderContents;
22 } 21 }
23 22
24 // A "tab contents" is a WebContents that is used as a tab in a browser window 23 // A "tab contents" is a WebContents that is used as a tab in a browser window
25 // (or the equivalent on Android). The TabHelpers class allows specific classes 24 // (or the equivalent on Android). The TabHelpers class allows specific classes
(...skipping 27 matching lines...) Expand all
53 friend class prerender::PrerenderContents; 52 friend class prerender::PrerenderContents;
54 53
55 // FYI: Do NOT add any more friends here. The functions above are the ONLY 54 // FYI: Do NOT add any more friends here. The functions above are the ONLY
56 // ones that need to call AttachTabHelpers; if you think you do, re-read the 55 // ones that need to call AttachTabHelpers; if you think you do, re-read the
57 // design document linked above, especially the section "Reusing tab helpers". 56 // design document linked above, especially the section "Reusing tab helpers".
58 57
59 // Adopts the specified WebContents as a full-fledged browser tab, attaching 58 // Adopts the specified WebContents as a full-fledged browser tab, attaching
60 // all the associated tab helpers that are needed for the WebContents to 59 // all the associated tab helpers that are needed for the WebContents to
61 // serve in that role. It is safe to call this on a WebContents that was 60 // serve in that role. It is safe to call this on a WebContents that was
62 // already adopted. 61 // already adopted.
63 static void AttachTabHelpers(content::WebContents* web_contents); 62 static void AttachTabHelpers(
63 content::WebContents* web_contents,
64 const base::Optional<content::WebContents::CreateParams>& create_params);
64 }; 65 };
65 66
66 #endif // CHROME_BROWSER_UI_TAB_HELPERS_H_ 67 #endif // CHROME_BROWSER_UI_TAB_HELPERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_strip_model_delegate.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698