| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
| 8 // For GdkScreen | 8 // For GdkScreen |
| 9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
| 10 #endif // defined(OS_CHROMEOS) | 10 #endif // defined(OS_CHROMEOS) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 62 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 63 #include "chrome/browser/renderer_host/resource_request_details.h" | 63 #include "chrome/browser/renderer_host/resource_request_details.h" |
| 64 #include "chrome/browser/renderer_host/site_instance.h" | 64 #include "chrome/browser/renderer_host/site_instance.h" |
| 65 #include "chrome/browser/renderer_host/web_cache_manager.h" | 65 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 66 #include "chrome/browser/renderer_preferences_util.h" | 66 #include "chrome/browser/renderer_preferences_util.h" |
| 67 #include "chrome/browser/search_engines/template_url_fetcher.h" | 67 #include "chrome/browser/search_engines/template_url_fetcher.h" |
| 68 #include "chrome/browser/search_engines/template_url_model.h" | 68 #include "chrome/browser/search_engines/template_url_model.h" |
| 69 #include "chrome/browser/sessions/session_types.h" | 69 #include "chrome/browser/sessions/session_types.h" |
| 70 #include "chrome/browser/tab_contents/infobar_delegate.h" | 70 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 71 #include "chrome/browser/tab_contents/interstitial_page.h" | 71 #include "chrome/browser/tab_contents/interstitial_page.h" |
| 72 #include "chrome/browser/tab_contents/match_preview.h" |
| 72 #include "chrome/browser/tab_contents/navigation_entry.h" | 73 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 73 #include "chrome/browser/tab_contents/provisional_load_details.h" | 74 #include "chrome/browser/tab_contents/provisional_load_details.h" |
| 74 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 75 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 75 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 76 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
| 76 #include "chrome/browser/tab_contents/tab_contents_view.h" | 77 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 77 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 78 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 78 #include "chrome/browser/translate/page_translated_details.h" | 79 #include "chrome/browser/translate/page_translated_details.h" |
| 79 #include "chrome/common/bindings_policy.h" | 80 #include "chrome/common/bindings_policy.h" |
| 80 #include "chrome/common/chrome_switches.h" | 81 #include "chrome/common/chrome_switches.h" |
| 81 #include "chrome/common/extensions/extension.h" | 82 #include "chrome/common/extensions/extension.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 registrar_.Add(this, NotificationType::EXTENSION_LOADED, | 418 registrar_.Add(this, NotificationType::EXTENSION_LOADED, |
| 418 NotificationService::AllSources()); | 419 NotificationService::AllSources()); |
| 419 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, | 420 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, |
| 420 NotificationService::AllSources()); | 421 NotificationService::AllSources()); |
| 421 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, | 422 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, |
| 422 NotificationService::AllSources()); | 423 NotificationService::AllSources()); |
| 423 | 424 |
| 424 // Set-up the showing of the omnibox search infobar if applicable. | 425 // Set-up the showing of the omnibox search infobar if applicable. |
| 425 if (OmniboxSearchHint::IsEnabled(profile)) | 426 if (OmniboxSearchHint::IsEnabled(profile)) |
| 426 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); | 427 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); |
| 428 |
| 429 if (MatchPreview::IsEnabled()) |
| 430 match_preview_.reset(new MatchPreview(this)); |
| 427 } | 431 } |
| 428 | 432 |
| 429 TabContents::~TabContents() { | 433 TabContents::~TabContents() { |
| 430 is_being_destroyed_ = true; | 434 is_being_destroyed_ = true; |
| 431 | 435 |
| 432 // We don't want any notifications while we're running our destructor. | 436 // We don't want any notifications while we're running our destructor. |
| 433 registrar_.RemoveAll(); | 437 registrar_.RemoveAll(); |
| 434 | 438 |
| 435 // Unregister the notifications of all observed prefs change. | 439 // Unregister the notifications of all observed prefs change. |
| 436 PrefService* prefs = profile()->GetPrefs(); | 440 PrefService* prefs = profile()->GetPrefs(); |
| (...skipping 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3329 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3333 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3330 } | 3334 } |
| 3331 | 3335 |
| 3332 Profile* TabContents::GetProfileForPasswordManager() { | 3336 Profile* TabContents::GetProfileForPasswordManager() { |
| 3333 return profile(); | 3337 return profile(); |
| 3334 } | 3338 } |
| 3335 | 3339 |
| 3336 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3340 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3337 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3341 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3338 } | 3342 } |
| OLD | NEW |