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

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

Issue 10959045: Switch WebIntentPickerController to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
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_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class TabSpecificContentSettings; 48 class TabSpecificContentSettings;
49 class TabStripModel; 49 class TabStripModel;
50 class TabStripModelContentsCreator; 50 class TabStripModelContentsCreator;
51 class ThumbnailGenerator; 51 class ThumbnailGenerator;
52 class TranslateTabHelper; 52 class TranslateTabHelper;
53 class TranslationInfoBarTestContentsCreator; 53 class TranslationInfoBarTestContentsCreator;
54 class WebDialogGtk; 54 class WebDialogGtk;
55 class WebDialogWindowControllerTabContentsCreator; 55 class WebDialogWindowControllerTabContentsCreator;
56 class WebIntentInlineDispositionBrowserTest; 56 class WebIntentInlineDispositionBrowserTest;
57 class WebIntentPickerCocoa; 57 class WebIntentPickerCocoa;
58 class WebIntentPickerController;
59 class WebIntentPickerGtk; 58 class WebIntentPickerGtk;
60 class WebUITestContentsCreator; 59 class WebUITestContentsCreator;
61 60
62 namespace browser_sync { 61 namespace browser_sync {
63 class SyncedTabDelegate; 62 class SyncedTabDelegate;
64 } 63 }
65 64
66 namespace chromeos { 65 namespace chromeos {
67 class SimpleWebViewDialog; 66 class SimpleWebViewDialog;
68 class WebUILoginView; 67 class WebUILoginView;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 198
200 // NOTE: This returns NULL unless in-browser thumbnail generation is enabled. 199 // NOTE: This returns NULL unless in-browser thumbnail generation is enabled.
201 ThumbnailGenerator* thumbnail_generator() { 200 ThumbnailGenerator* thumbnail_generator() {
202 return thumbnail_generator_.get(); 201 return thumbnail_generator_.get();
203 } 202 }
204 203
205 TranslateTabHelper* translate_tab_helper() { 204 TranslateTabHelper* translate_tab_helper() {
206 return translate_tab_helper_.get(); 205 return translate_tab_helper_.get();
207 } 206 }
208 207
209 WebIntentPickerController* web_intent_picker_controller() {
210 return web_intent_picker_controller_.get();
211 }
212
213 // Overrides ----------------------------------------------------------------- 208 // Overrides -----------------------------------------------------------------
214 209
215 // content::WebContentsObserver overrides: 210 // content::WebContentsObserver overrides:
216 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 211 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
217 212
218 private: 213 private:
219 friend class TabContentsFactory; 214 friend class TabContentsFactory;
220 215
221 // Takes ownership of |contents|, which must be heap-allocated (as it lives 216 // Takes ownership of |contents|, which must be heap-allocated (as it lives
222 // in a scoped_ptr) and can not be NULL. 217 // in a scoped_ptr) and can not be NULL.
(...skipping 28 matching lines...) Expand all
251 246
252 scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_; 247 scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_;
253 248
254 // The TabSpecificContentSettings object is used to query the blocked content 249 // The TabSpecificContentSettings object is used to query the blocked content
255 // state by various UI elements. 250 // state by various UI elements.
256 scoped_ptr<TabSpecificContentSettings> content_settings_; 251 scoped_ptr<TabSpecificContentSettings> content_settings_;
257 252
258 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; 253 scoped_ptr<ThumbnailGenerator> thumbnail_generator_;
259 scoped_ptr<TranslateTabHelper> translate_tab_helper_; 254 scoped_ptr<TranslateTabHelper> translate_tab_helper_;
260 255
261 // Handles displaying a web intents picker to the user.
262 scoped_ptr<WebIntentPickerController> web_intent_picker_controller_;
263
264 // Per-tab observers --------------------------------------------------------- 256 // Per-tab observers ---------------------------------------------------------
265 // (These provide no API for callers; objects that need to exist 1:1 with tabs 257 // (These provide no API for callers; objects that need to exist 1:1 with tabs
266 // and silently do their thing live here.) 258 // and silently do their thing live here.)
267 259
268 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; 260 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_;
269 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_; 261 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_;
270 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_; 262 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_;
271 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> 263 scoped_ptr<safe_browsing::SafeBrowsingTabObserver>
272 safe_browsing_tab_observer_; 264 safe_browsing_tab_observer_;
273 265
274 // WebContents (MUST BE LAST) ------------------------------------------------ 266 // WebContents (MUST BE LAST) ------------------------------------------------
275 267
276 // If true, we're running the destructor. 268 // If true, we're running the destructor.
277 bool in_destructor_; 269 bool in_destructor_;
278 270
279 // The supporting objects need to outlive the WebContents dtor (as they may 271 // The supporting objects need to outlive the WebContents dtor (as they may
280 // be called upon during its execution). As a result, this must come last 272 // be called upon during its execution). As a result, this must come last
281 // in the list. 273 // in the list.
282 scoped_ptr<content::WebContents> web_contents_; 274 scoped_ptr<content::WebContents> web_contents_;
283 275
284 DISALLOW_COPY_AND_ASSIGN(TabContents); 276 DISALLOW_COPY_AND_ASSIGN(TabContents);
285 }; 277 };
286 278
287 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 279 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698