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

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

Issue 10801006: Allow secondary tiles to be unpinned. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove NULL check 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
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 #include "chrome/browser/ui/tab_contents/tab_contents.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "chrome/browser/autocomplete_history_manager.h" 9 #include "chrome/browser/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
(...skipping 19 matching lines...) Expand all
30 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" 30 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
31 #include "chrome/browser/tab_contents/thumbnail_generator.h" 31 #include "chrome/browser/tab_contents/thumbnail_generator.h"
32 #include "chrome/browser/translate/translate_tab_helper.h" 32 #include "chrome/browser/translate/translate_tab_helper.h"
33 #include "chrome/browser/ui/alternate_error_tab_observer.h" 33 #include "chrome/browser/ui/alternate_error_tab_observer.h"
34 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 34 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
35 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 35 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
36 #include "chrome/browser/ui/constrained_window_tab_helper.h" 36 #include "chrome/browser/ui/constrained_window_tab_helper.h"
37 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 37 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
38 #include "chrome/browser/ui/hung_plugin_tab_helper.h" 38 #include "chrome/browser/ui/hung_plugin_tab_helper.h"
39 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" 39 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
40 #include "chrome/browser/ui/metro_pin_tab_helper.h"
40 #include "chrome/browser/ui/pdf/pdf_tab_observer.h" 41 #include "chrome/browser/ui/pdf/pdf_tab_observer.h"
41 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 42 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
42 #include "chrome/browser/ui/sad_tab_helper.h" 43 #include "chrome/browser/ui/sad_tab_helper.h"
43 #include "chrome/browser/ui/search/search.h" 44 #include "chrome/browser/ui/search/search.h"
44 #include "chrome/browser/ui/search/search_tab_helper.h" 45 #include "chrome/browser/ui/search/search_tab_helper.h"
45 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 46 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
46 #include "chrome/browser/ui/snapshot_tab_helper.h" 47 #include "chrome/browser/ui/snapshot_tab_helper.h"
47 #include "chrome/browser/ui/sync/one_click_signin_helper.h" 48 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
48 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" 49 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
49 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 50 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); 102 new captive_portal::CaptivePortalTabHelper(profile(), web_contents()));
102 #endif 103 #endif
103 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); 104 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this));
104 core_tab_helper_.reset(new CoreTabHelper(contents)); 105 core_tab_helper_.reset(new CoreTabHelper(contents));
105 extension_tab_helper_.reset(new extensions::TabHelper(this)); 106 extension_tab_helper_.reset(new extensions::TabHelper(this));
106 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); 107 favicon_tab_helper_.reset(new FaviconTabHelper(contents));
107 find_tab_helper_.reset(new FindTabHelper(contents)); 108 find_tab_helper_.reset(new FindTabHelper(contents));
108 history_tab_helper_.reset(new HistoryTabHelper(contents)); 109 history_tab_helper_.reset(new HistoryTabHelper(contents));
109 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); 110 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents));
110 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); 111 infobar_tab_helper_.reset(new InfoBarTabHelper(contents));
112 metro_pin_tab_helper_.reset(new MetroPinTabHelper(contents));
111 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); 113 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this));
112 password_manager_.reset( 114 password_manager_.reset(
113 new PasswordManager(contents, password_manager_delegate_.get())); 115 new PasswordManager(contents, password_manager_delegate_.get()));
114 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); 116 prefs_tab_helper_.reset(new PrefsTabHelper(contents));
115 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); 117 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this));
116 restore_tab_helper_.reset(new RestoreTabHelper(contents)); 118 restore_tab_helper_.reset(new RestoreTabHelper(contents));
117 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); 119 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents));
118 bool is_search_enabled = 120 bool is_search_enabled =
119 chrome::search::IsInstantExtendedAPIEnabled(profile()); 121 chrome::search::IsInstantExtendedAPIEnabled(profile());
120 search_tab_helper_.reset( 122 search_tab_helper_.reset(
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 236
235 //////////////////////////////////////////////////////////////////////////////// 237 ////////////////////////////////////////////////////////////////////////////////
236 // WebContentsObserver overrides 238 // WebContentsObserver overrides
237 239
238 void TabContents::WebContentsDestroyed(WebContents* tab) { 240 void TabContents::WebContentsDestroyed(WebContents* tab) {
239 // Destruction of the WebContents should only be done by us from our 241 // Destruction of the WebContents should only be done by us from our
240 // destructor. Otherwise it's very likely we (or one of the helpers we own) 242 // destructor. Otherwise it's very likely we (or one of the helpers we own)
241 // will attempt to access the WebContents and we'll crash. 243 // will attempt to access the WebContents and we'll crash.
242 DCHECK(in_destructor_); 244 DCHECK(in_destructor_);
243 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698