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

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.h

Issue 7838030: WIP: Introduce per-TabContents PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use TabContentsWrapper instead of rolling our own TabContents property. Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CONTENTS_TAB_CONTENTS_WRAPPER_H_ 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 class BookmarkTabHelper; 25 class BookmarkTabHelper;
26 class DownloadRequestLimiterObserver; 26 class DownloadRequestLimiterObserver;
27 class Extension; 27 class Extension;
28 class ExtensionTabHelper; 28 class ExtensionTabHelper;
29 class ExtensionWebNavigationTabObserver; 29 class ExtensionWebNavigationTabObserver;
30 class ExternalProtocolObserver; 30 class ExternalProtocolObserver;
31 class FaviconTabHelper; 31 class FaviconTabHelper;
32 class FileSelectObserver; 32 class FileSelectObserver;
33 class FindTabHelper; 33 class FindTabHelper;
34 class FirewallTraversalObserver; 34 class FirewallTraversalObserver;
35 class HistoryTabHelper;
35 class InfoBarTabHelper; 36 class InfoBarTabHelper;
36 class HistoryTabHelper;
37 class NavigationController; 37 class NavigationController;
38 class OmniboxSearchHint; 38 class OmniboxSearchHint;
39 class PasswordManager; 39 class PasswordManager;
40 class PasswordManagerDelegate; 40 class PasswordManagerDelegate;
41 class PluginObserver; 41 class PluginObserver;
42 class PrefService;
42 class Profile; 43 class Profile;
43 class RestoreTabHelper; 44 class RestoreTabHelper;
44 class SearchEngineTabHelper; 45 class SearchEngineTabHelper;
45 class TabContentsSSLHelper; 46 class TabContentsSSLHelper;
46 class TabContentsWrapperDelegate; 47 class TabContentsWrapperDelegate;
47 class TabContentsWrapperSyncedTabDelegate; 48 class TabContentsWrapperSyncedTabDelegate;
48 class TabSpecificContentSettings; 49 class TabSpecificContentSettings;
49 class ThumbnailGenerator; 50 class ThumbnailGenerator;
50 class TranslateTabHelper; 51 class TranslateTabHelper;
51 class WebIntentPickerController; 52 class WebIntentPickerController;
52 53
53 namespace browser_sync { 54 namespace browser_sync {
54 class SyncedTabDelegate; 55 class SyncedTabDelegate;
55 } 56 }
56 57
57 namespace IPC { 58 namespace IPC {
58 class Message; 59 class Message;
59 } 60 }
60 61
61 namespace prerender { 62 namespace prerender {
62 class PrerenderTabHelper; 63 class PrerenderTabHelper;
63 } 64 }
64 65
65 namespace printing { 66 namespace printing {
67 class PrintPreviewMessageHandler;
66 class PrintViewManager; 68 class PrintViewManager;
67 class PrintPreviewMessageHandler;
68 } 69 }
69 70
70 namespace safe_browsing { 71 namespace safe_browsing {
71 class ClientSideDetectionHost; 72 class ClientSideDetectionHost;
72 } 73 }
73 74
74 // Wraps TabContents and all of its supporting objects in order to control 75 // Wraps TabContents and all of its supporting objects in order to control
75 // their ownership and lifetime, while allowing TabContents to remain generic 76 // their ownership and lifetime, while allowing TabContents to remain generic
76 // and re-usable in other projects. 77 // and re-usable in other projects.
77 // TODO(pinkerton): Eventually, this class will become TabContents as far as 78 // TODO(pinkerton): Eventually, this class will become TabContents as far as
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 204 }
204 205
205 TranslateTabHelper* translate_tab_helper() { 206 TranslateTabHelper* translate_tab_helper() {
206 return translate_tab_helper_.get(); 207 return translate_tab_helper_.get();
207 } 208 }
208 209
209 WebIntentPickerController* web_intent_picker_controller() { 210 WebIntentPickerController* web_intent_picker_controller() {
210 return web_intent_picker_controller_.get(); 211 return web_intent_picker_controller_.get();
211 } 212 }
212 213
214 PrefService* per_tab_prefs() {
Avi (use Gerrit) 2011/09/08 14:33:37 When you notice a pattern of alphabetical items, p
215 return per_tab_prefs_.get();
216 }
217
213 // Overrides ----------------------------------------------------------------- 218 // Overrides -----------------------------------------------------------------
214 219
215 // TabContentsObserver overrides: 220 // TabContentsObserver overrides:
216 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; 221 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
217 virtual void RenderViewGone() OVERRIDE; 222 virtual void RenderViewGone() OVERRIDE;
218 virtual void DidBecomeSelected() OVERRIDE; 223 virtual void DidBecomeSelected() OVERRIDE;
219 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 224 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
220 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; 225 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
221 226
222 // NotificationObserver overrides: 227 // NotificationObserver overrides:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 306
302 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; 307 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_;
303 scoped_ptr<TabContentsSSLHelper> ssl_helper_; 308 scoped_ptr<TabContentsSSLHelper> ssl_helper_;
304 309
305 // The TabSpecificContentSettings object is used to query the blocked content 310 // The TabSpecificContentSettings object is used to query the blocked content
306 // state by various UI elements. 311 // state by various UI elements.
307 scoped_ptr<TabSpecificContentSettings> content_settings_; 312 scoped_ptr<TabSpecificContentSettings> content_settings_;
308 313
309 scoped_ptr<TranslateTabHelper> translate_tab_helper_; 314 scoped_ptr<TranslateTabHelper> translate_tab_helper_;
310 315
316 scoped_ptr<PrefService> per_tab_prefs_;
Avi (use Gerrit) 2011/09/08 14:33:37 ditto re alphabetizing
317
311 // Per-tab observers --------------------------------------------------------- 318 // Per-tab observers ---------------------------------------------------------
312 // (These provide no API for callers; objects that need to exist 1:1 with tabs 319 // (These provide no API for callers; objects that need to exist 1:1 with tabs
313 // and silently do their thing live here.) 320 // and silently do their thing live here.)
314 321
315 scoped_ptr<DownloadRequestLimiterObserver> download_request_limiter_observer_; 322 scoped_ptr<DownloadRequestLimiterObserver> download_request_limiter_observer_;
316 scoped_ptr<ExtensionWebNavigationTabObserver> webnavigation_observer_; 323 scoped_ptr<ExtensionWebNavigationTabObserver> webnavigation_observer_;
317 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; 324 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_;
318 scoped_ptr<FirewallTraversalObserver> firewall_traversal_observer_; 325 scoped_ptr<FirewallTraversalObserver> firewall_traversal_observer_;
319 scoped_ptr<PluginObserver> plugin_observer_; 326 scoped_ptr<PluginObserver> plugin_observer_;
320 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; 327 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_;
321 scoped_ptr<ThumbnailGenerator> thumbnail_generation_observer_; 328 scoped_ptr<ThumbnailGenerator> thumbnail_generation_observer_;
322 329
323 // TabContents (MUST BE LAST) ------------------------------------------------ 330 // TabContents (MUST BE LAST) ------------------------------------------------
324 331
325 // If true, we're running the destructor. 332 // If true, we're running the destructor.
326 bool in_destructor_; 333 bool in_destructor_;
327 334
328 // The supporting objects need to outlive the TabContents dtor (as they may 335 // The supporting objects need to outlive the TabContents dtor (as they may
329 // be called upon during its execution). As a result, this must come last 336 // be called upon during its execution). As a result, this must come last
330 // in the list. 337 // in the list.
331 scoped_ptr<TabContents> tab_contents_; 338 scoped_ptr<TabContents> tab_contents_;
332 339
333 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); 340 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper);
334 }; 341 };
335 342
336 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ 343 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698