| 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/message_box_flags.h" | 12 #include "app/message_box_flags.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/field_trial.h" | 17 #include "base/field_trial.h" |
| 18 #include "base/histogram.h" | 18 #include "base/histogram.h" |
| 19 #include "base/process_util.h" | 19 #include "base/process_util.h" |
| 20 #include "base/singleton.h" | 20 #include "base/singleton.h" |
| 21 #include "base/string_piece.h" | 21 #include "base/string_piece.h" |
| 22 #include "base/string_util.h" | 22 #include "base/string_util.h" |
| 23 #include "base/time.h" | 23 #include "base/time.h" |
| 24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
| 25 #include "chrome/common/appcache/appcache_dispatcher.h" |
| 25 #include "chrome/common/bindings_policy.h" | 26 #include "chrome/common/bindings_policy.h" |
| 26 #include "chrome/common/child_process_logging.h" | 27 #include "chrome/common/child_process_logging.h" |
| 27 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/chrome_constants.h" | 29 #include "chrome/common/chrome_constants.h" |
| 29 #include "chrome/common/extensions/extension_constants.h" | 30 #include "chrome/common/extensions/extension_constants.h" |
| 30 #include "chrome/common/jstemplate_builder.h" | 31 #include "chrome/common/jstemplate_builder.h" |
| 31 #include "chrome/common/page_zoom.h" | 32 #include "chrome/common/page_zoom.h" |
| 32 #include "chrome/common/render_messages.h" | 33 #include "chrome/common/render_messages.h" |
| 33 #include "chrome/common/renderer_preferences.h" | 34 #include "chrome/common/renderer_preferences.h" |
| 34 #include "chrome/common/thumbnail_score.h" | 35 #include "chrome/common/thumbnail_score.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 using base::Time; | 137 using base::Time; |
| 137 using base::TimeDelta; | 138 using base::TimeDelta; |
| 138 using webkit_glue::AltErrorPageResourceFetcher; | 139 using webkit_glue::AltErrorPageResourceFetcher; |
| 139 using webkit_glue::FormData; | 140 using webkit_glue::FormData; |
| 140 using webkit_glue::FormField; | 141 using webkit_glue::FormField; |
| 141 using webkit_glue::ImageResourceFetcher; | 142 using webkit_glue::ImageResourceFetcher; |
| 142 using webkit_glue::PasswordForm; | 143 using webkit_glue::PasswordForm; |
| 143 using webkit_glue::PasswordFormDomManager; | 144 using webkit_glue::PasswordFormDomManager; |
| 144 using WebKit::WebAccessibilityCache; | 145 using WebKit::WebAccessibilityCache; |
| 145 using WebKit::WebAccessibilityObject; | 146 using WebKit::WebAccessibilityObject; |
| 147 using WebKit::WebApplicationCacheHost; |
| 148 using WebKit::WebApplicationCacheHostClient; |
| 146 using WebKit::WebColor; | 149 using WebKit::WebColor; |
| 147 using WebKit::WebColorName; | 150 using WebKit::WebColorName; |
| 148 using WebKit::WebConsoleMessage; | 151 using WebKit::WebConsoleMessage; |
| 149 using WebKit::WebContextMenuData; | 152 using WebKit::WebContextMenuData; |
| 150 using WebKit::WebCookieJar; | 153 using WebKit::WebCookieJar; |
| 151 using WebKit::WebCString; | 154 using WebKit::WebCString; |
| 152 using WebKit::WebData; | 155 using WebKit::WebData; |
| 153 using WebKit::WebDataSource; | 156 using WebKit::WebDataSource; |
| 154 using WebKit::WebDevToolsAgent; | 157 using WebKit::WebDevToolsAgent; |
| 155 using WebKit::WebDocument; | 158 using WebKit::WebDocument; |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2120 factory_factory = new IPCVideoRenderer::FactoryFactory(routing_id_); | 2123 factory_factory = new IPCVideoRenderer::FactoryFactory(routing_id_); |
| 2121 } else { | 2124 } else { |
| 2122 bool pts_logging = cmd_line->HasSwitch(switches::kEnableVideoLogging); | 2125 bool pts_logging = cmd_line->HasSwitch(switches::kEnableVideoLogging); |
| 2123 factory_factory = | 2126 factory_factory = |
| 2124 new webkit_glue::VideoRendererImpl::FactoryFactory(pts_logging); | 2127 new webkit_glue::VideoRendererImpl::FactoryFactory(pts_logging); |
| 2125 } | 2128 } |
| 2126 | 2129 |
| 2127 return new webkit_glue::WebMediaPlayerImpl(client, factory, factory_factory); | 2130 return new webkit_glue::WebMediaPlayerImpl(client, factory, factory_factory); |
| 2128 } | 2131 } |
| 2129 | 2132 |
| 2133 WebApplicationCacheHost* RenderView::createApplicationCacheHost( |
| 2134 WebFrame* frame, WebApplicationCacheHostClient* client) { |
| 2135 return new appcache::WebApplicationCacheHostImpl(client, |
| 2136 RenderThread::current()->appcache_dispatcher()->backend_proxy()); |
| 2137 } |
| 2138 |
| 2130 WebCookieJar* RenderView::cookieJar() { | 2139 WebCookieJar* RenderView::cookieJar() { |
| 2131 return &cookie_jar_; | 2140 return &cookie_jar_; |
| 2132 } | 2141 } |
| 2133 | 2142 |
| 2134 void RenderView::willClose(WebFrame* frame) { | 2143 void RenderView::willClose(WebFrame* frame) { |
| 2135 if (!frame->parent()) { | 2144 if (!frame->parent()) { |
| 2136 const GURL& url = frame->url(); | 2145 const GURL& url = frame->url(); |
| 2137 if (url.SchemeIs("http") || url.SchemeIs("https")) | 2146 if (url.SchemeIs("http") || url.SchemeIs("https")) |
| 2138 DumpLoadHistograms(); | 2147 DumpLoadHistograms(); |
| 2139 } | 2148 } |
| (...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4950 | 4959 |
| 4951 if (last_top_level_navigation_page_id_ != page_id_ && | 4960 if (last_top_level_navigation_page_id_ != page_id_ && |
| 4952 // Not interested in reloads. | 4961 // Not interested in reloads. |
| 4953 type != WebKit::WebNavigationTypeReload && | 4962 type != WebKit::WebNavigationTypeReload && |
| 4954 type != WebKit::WebNavigationTypeFormSubmitted) { | 4963 type != WebKit::WebNavigationTypeFormSubmitted) { |
| 4955 return true; | 4964 return true; |
| 4956 } | 4965 } |
| 4957 } | 4966 } |
| 4958 return false; | 4967 return false; |
| 4959 } | 4968 } |
| OLD | NEW |