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

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

Issue 9696049: Add enable_automation build switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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_wrapper.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(contents)); 74 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(contents));
75 autofill_manager_ = new AutofillManager(this); 75 autofill_manager_ = new AutofillManager(this);
76 if (CommandLine::ForCurrentProcess()->HasSwitch( 76 if (CommandLine::ForCurrentProcess()->HasSwitch(
77 switches::kExternalAutofillPopup)) { 77 switches::kExternalAutofillPopup)) {
78 autofill_external_delegate_.reset( 78 autofill_external_delegate_.reset(
79 AutofillExternalDelegate::Create(this, autofill_manager_.get())); 79 AutofillExternalDelegate::Create(this, autofill_manager_.get()));
80 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get()); 80 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
81 autocomplete_history_manager_->SetExternalDelegate( 81 autocomplete_history_manager_->SetExternalDelegate(
82 autofill_external_delegate_.get()); 82 autofill_external_delegate_.get());
83 } 83 }
84 #if defined(ENABLE_AUTOMATION)
84 automation_tab_helper_.reset(new AutomationTabHelper(contents)); 85 automation_tab_helper_.reset(new AutomationTabHelper(contents));
86 #endif
85 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); 87 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this));
86 bookmark_tab_helper_.reset(new BookmarkTabHelper(this)); 88 bookmark_tab_helper_.reset(new BookmarkTabHelper(this));
87 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); 89 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this));
88 core_tab_helper_.reset(new CoreTabHelper(contents)); 90 core_tab_helper_.reset(new CoreTabHelper(contents));
89 extension_tab_helper_.reset(new ExtensionTabHelper(this)); 91 extension_tab_helper_.reset(new ExtensionTabHelper(this));
90 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); 92 favicon_tab_helper_.reset(new FaviconTabHelper(contents));
91 find_tab_helper_.reset(new FindTabHelper(contents)); 93 find_tab_helper_.reset(new FindTabHelper(contents));
92 history_tab_helper_.reset(new HistoryTabHelper(contents)); 94 history_tab_helper_.reset(new HistoryTabHelper(contents));
93 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); 95 infobar_tab_helper_.reset(new InfoBarTabHelper(contents));
94 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); 96 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 197
196 //////////////////////////////////////////////////////////////////////////////// 198 ////////////////////////////////////////////////////////////////////////////////
197 // WebContentsObserver overrides 199 // WebContentsObserver overrides
198 200
199 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { 201 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) {
200 // Destruction of the WebContents should only be done by us from our 202 // Destruction of the WebContents should only be done by us from our
201 // destructor. Otherwise it's very likely we (or one of the helpers we own) 203 // destructor. Otherwise it's very likely we (or one of the helpers we own)
202 // will attempt to access the TabContents and we'll crash. 204 // will attempt to access the TabContents and we'll crash.
203 DCHECK(in_destructor_); 205 DCHECK(in_destructor_);
204 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698