OLD | NEW |
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 #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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 in_destructor_(false), | 240 in_destructor_(false), |
241 tab_contents_(contents) { | 241 tab_contents_(contents) { |
242 DCHECK(contents); | 242 DCHECK(contents); |
243 DCHECK(!GetCurrentWrapperForContents(contents)); | 243 DCHECK(!GetCurrentWrapperForContents(contents)); |
244 // Stash this in the property bag so it can be retrieved without having to | 244 // Stash this in the property bag so it can be retrieved without having to |
245 // go to a Browser. | 245 // go to a Browser. |
246 property_accessor()->SetProperty(contents->property_bag(), this); | 246 property_accessor()->SetProperty(contents->property_bag(), this); |
247 | 247 |
248 // Create the tab helpers. | 248 // Create the tab helpers. |
249 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(contents)); | 249 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(contents)); |
250 autofill_manager_.reset(new AutofillManager(this)); | 250 autofill_manager_ = new AutofillManager(this); |
251 if (CommandLine::ForCurrentProcess()->HasSwitch( | 251 if (CommandLine::ForCurrentProcess()->HasSwitch( |
252 switches::kExternalAutofillPopup)) { | 252 switches::kExternalAutofillPopup)) { |
253 autofill_external_delegate_.reset( | 253 autofill_external_delegate_.reset( |
254 AutofillExternalDelegate::Create(this, autofill_manager_.get())); | 254 AutofillExternalDelegate::Create(this, autofill_manager_.get())); |
255 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get()); | 255 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get()); |
256 autocomplete_history_manager_->SetExternalDelegate( | 256 autocomplete_history_manager_->SetExternalDelegate( |
257 autofill_external_delegate_.get()); | 257 autofill_external_delegate_.get()); |
258 } | 258 } |
259 automation_tab_helper_.reset(new AutomationTabHelper(contents)); | 259 automation_tab_helper_.reset(new AutomationTabHelper(contents)); |
260 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); | 260 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 render_view_host()->Send( | 680 render_view_host()->Send( |
681 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), | 681 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), |
682 safe_browsing)); | 682 safe_browsing)); |
683 #endif | 683 #endif |
684 } | 684 } |
685 | 685 |
686 void TabContentsWrapper::ExitFullscreenMode() { | 686 void TabContentsWrapper::ExitFullscreenMode() { |
687 if (tab_contents() && render_view_host()) | 687 if (tab_contents() && render_view_host()) |
688 tab_contents()->render_view_host()->ExitFullscreen(); | 688 tab_contents()->render_view_host()->ExitFullscreen(); |
689 } | 689 } |
OLD | NEW |