| 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/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/metrics/stats_counters.h" | 11 #include "base/metrics/stats_counters.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "chrome/browser/profiles/profile.h" | 59 #include "chrome/browser/profiles/profile.h" |
| 60 #include "chrome/browser/renderer_host/render_process_host.h" | 60 #include "chrome/browser/renderer_host/render_process_host.h" |
| 61 #include "chrome/browser/renderer_host/render_view_host.h" | 61 #include "chrome/browser/renderer_host/render_view_host.h" |
| 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/safe_browsing/client_side_detection_host.h" | 67 #include "chrome/browser/safe_browsing/client_side_detection_host.h" |
| 68 #include "chrome/browser/sessions/session_types.h" | 68 #include "chrome/browser/sessions/session_types.h" |
| 69 #include "chrome/browser/tab_contents/infobar_delegate.h" | |
| 70 #include "chrome/browser/tab_contents/interstitial_page.h" | |
| 71 #include "chrome/browser/tab_contents/navigation_entry.h" | |
| 72 #include "chrome/browser/tab_contents/provisional_load_details.h" | |
| 73 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | |
| 74 #include "chrome/browser/tab_contents/tab_contents_observer.h" | |
| 75 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 69 #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/thumbnail_generator.h" | 70 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 78 #include "chrome/browser/translate/page_translated_details.h" | 71 #include "chrome/browser/translate/page_translated_details.h" |
| 79 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" | 72 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" |
| 80 #include "chrome/common/bindings_policy.h" | 73 #include "chrome/common/bindings_policy.h" |
| 81 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
| 82 #include "chrome/common/content_restriction.h" | 75 #include "chrome/common/content_restriction.h" |
| 83 #include "chrome/common/extensions/extension.h" | 76 #include "chrome/common/extensions/extension.h" |
| 84 #include "chrome/common/extensions/extension_action.h" | 77 #include "chrome/common/extensions/extension_action.h" |
| 85 #include "chrome/common/extensions/extension_icon_set.h" | 78 #include "chrome/common/extensions/extension_icon_set.h" |
| 86 #include "chrome/common/extensions/extension_resource.h" | 79 #include "chrome/common/extensions/extension_resource.h" |
| 87 #include "chrome/common/extensions/url_pattern.h" | 80 #include "chrome/common/extensions/url_pattern.h" |
| 88 #include "chrome/common/navigation_types.h" | 81 #include "chrome/common/navigation_types.h" |
| 89 #include "chrome/common/net/url_request_context_getter.h" | 82 #include "chrome/common/net/url_request_context_getter.h" |
| 90 #include "chrome/common/notification_service.h" | 83 #include "chrome/common/notification_service.h" |
| 91 #include "chrome/common/pref_names.h" | 84 #include "chrome/common/pref_names.h" |
| 92 #include "chrome/common/render_messages.h" | 85 #include "chrome/common/render_messages.h" |
| 93 #include "chrome/common/render_messages_params.h" | 86 #include "chrome/common/render_messages_params.h" |
| 94 #include "chrome/common/url_constants.h" | 87 #include "chrome/common/url_constants.h" |
| 88 #include "content/browser/tab_contents/infobar_delegate.h" |
| 89 #include "content/browser/tab_contents/interstitial_page.h" |
| 90 #include "content/browser/tab_contents/navigation_entry.h" |
| 91 #include "content/browser/tab_contents/provisional_load_details.h" |
| 92 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 93 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 94 #include "content/browser/tab_contents/tab_contents_view.h" |
| 95 #include "grit/chromium_strings.h" | 95 #include "grit/chromium_strings.h" |
| 96 #include "grit/generated_resources.h" | 96 #include "grit/generated_resources.h" |
| 97 #include "grit/locale_settings.h" | 97 #include "grit/locale_settings.h" |
| 98 #include "grit/platform_locale_settings.h" | 98 #include "grit/platform_locale_settings.h" |
| 99 #include "grit/theme_resources.h" | 99 #include "grit/theme_resources.h" |
| 100 #include "net/base/net_util.h" | 100 #include "net/base/net_util.h" |
| 101 #include "net/base/registry_controlled_domain.h" | 101 #include "net/base/registry_controlled_domain.h" |
| 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 103 #include "ui/base/l10n/l10n_util.h" | 103 #include "ui/base/l10n/l10n_util.h" |
| 104 #include "ui/base/resource/resource_bundle.h" | 104 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2953 } | 2953 } |
| 2954 | 2954 |
| 2955 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { | 2955 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { |
| 2956 prerender::PrerenderManager* pm = profile()->GetPrerenderManager(); | 2956 prerender::PrerenderManager* pm = profile()->GetPrerenderManager(); |
| 2957 if (pm != NULL) { | 2957 if (pm != NULL) { |
| 2958 if (pm->MaybeUsePreloadedPage(this, url)) | 2958 if (pm->MaybeUsePreloadedPage(this, url)) |
| 2959 return true; | 2959 return true; |
| 2960 } | 2960 } |
| 2961 return false; | 2961 return false; |
| 2962 } | 2962 } |
| OLD | NEW |