OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "chrome/browser/autofill/autofill_manager.h" |
14 #include "chrome/browser/blocked_popup_container.h" | 15 #include "chrome/browser/blocked_popup_container.h" |
15 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/cert_store.h" | 18 #include "chrome/browser/cert_store.h" |
18 #include "chrome/browser/character_encoding.h" | 19 #include "chrome/browser/character_encoding.h" |
19 #include "chrome/browser/debugger/devtools_manager.h" | 20 #include "chrome/browser/debugger/devtools_manager.h" |
20 #include "chrome/browser/dom_operation_notification_details.h" | 21 #include "chrome/browser/dom_operation_notification_details.h" |
21 #include "chrome/browser/dom_ui/dom_ui.h" | 22 #include "chrome/browser/dom_ui/dom_ui.h" |
22 #include "chrome/browser/dom_ui/dom_ui_factory.h" | 23 #include "chrome/browser/dom_ui/dom_ui_factory.h" |
23 #include "chrome/browser/download/download_item_model.h" | 24 #include "chrome/browser/download/download_item_model.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 ALLOW_THIS_IN_INITIALIZER_LIST(controller_(this, profile)), | 224 ALLOW_THIS_IN_INITIALIZER_LIST(controller_(this, profile)), |
224 ALLOW_THIS_IN_INITIALIZER_LIST(view_( | 225 ALLOW_THIS_IN_INITIALIZER_LIST(view_( |
225 TabContentsView::Create(this))), | 226 TabContentsView::Create(this))), |
226 ALLOW_THIS_IN_INITIALIZER_LIST(render_manager_(this, this)), | 227 ALLOW_THIS_IN_INITIALIZER_LIST(render_manager_(this, this)), |
227 property_bag_(), | 228 property_bag_(), |
228 registrar_(), | 229 registrar_(), |
229 ALLOW_THIS_IN_INITIALIZER_LIST(printing_(*this)), | 230 ALLOW_THIS_IN_INITIALIZER_LIST(printing_(*this)), |
230 save_package_(), | 231 save_package_(), |
231 cancelable_consumer_(), | 232 cancelable_consumer_(), |
232 form_field_history_manager_(), | 233 form_field_history_manager_(), |
| 234 autofill_manager_(), |
233 password_manager_(), | 235 password_manager_(), |
234 plugin_installer_(), | 236 plugin_installer_(), |
235 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)), | 237 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)), |
236 select_file_dialog_(), | 238 select_file_dialog_(), |
237 pending_install_(), | 239 pending_install_(), |
238 is_loading_(false), | 240 is_loading_(false), |
239 is_crashed_(false), | 241 is_crashed_(false), |
240 waiting_for_response_(false), | 242 waiting_for_response_(false), |
241 max_page_id_(-1), | 243 max_page_id_(-1), |
242 current_load_start_(), | 244 current_load_start_(), |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1930 return &fav_icon_helper_; | 1932 return &fav_icon_helper_; |
1931 } | 1933 } |
1932 | 1934 |
1933 RenderViewHostDelegate::FormFieldHistory* | 1935 RenderViewHostDelegate::FormFieldHistory* |
1934 TabContents::GetFormFieldHistoryDelegate() { | 1936 TabContents::GetFormFieldHistoryDelegate() { |
1935 if (form_field_history_manager_.get() == NULL) | 1937 if (form_field_history_manager_.get() == NULL) |
1936 form_field_history_manager_.reset(new FormFieldHistoryManager(this)); | 1938 form_field_history_manager_.reset(new FormFieldHistoryManager(this)); |
1937 return form_field_history_manager_.get(); | 1939 return form_field_history_manager_.get(); |
1938 } | 1940 } |
1939 | 1941 |
| 1942 RenderViewHostDelegate::AutoFill* TabContents::GetAutoFillDelegate() { |
| 1943 if (autofill_manager_.get() == NULL) |
| 1944 autofill_manager_.reset(new AutoFillManager(this)); |
| 1945 return autofill_manager_.get(); |
| 1946 } |
| 1947 |
1940 RendererPreferences TabContents::GetRendererPrefs() const { | 1948 RendererPreferences TabContents::GetRendererPrefs() const { |
1941 return renderer_preferences_; | 1949 return renderer_preferences_; |
1942 } | 1950 } |
1943 | 1951 |
1944 TabContents* TabContents::GetAsTabContents() { | 1952 TabContents* TabContents::GetAsTabContents() { |
1945 return this; | 1953 return this; |
1946 } | 1954 } |
1947 | 1955 |
1948 void TabContents::AddBlockedNotice(const GURL& url, const string16& reason) { | 1956 void TabContents::AddBlockedNotice(const GURL& url, const string16& reason) { |
1949 CreateBlockedPopupContainerIfNecessary(); | 1957 CreateBlockedPopupContainerIfNecessary(); |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 #endif | 2632 #endif |
2625 | 2633 |
2626 default: | 2634 default: |
2627 NOTREACHED(); | 2635 NOTREACHED(); |
2628 } | 2636 } |
2629 } | 2637 } |
2630 | 2638 |
2631 void TabContents::set_encoding(const std::string& encoding) { | 2639 void TabContents::set_encoding(const std::string& encoding) { |
2632 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); | 2640 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); |
2633 } | 2641 } |
OLD | NEW |