Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 #include "content/common/drag_messages.h" | 31 #include "content/common/drag_messages.h" |
| 32 #include "content/common/file_system/file_system_dispatcher.h" | 32 #include "content/common/file_system/file_system_dispatcher.h" |
| 33 #include "content/common/file_system/webfilesystem_callback_dispatcher.h" | 33 #include "content/common/file_system/webfilesystem_callback_dispatcher.h" |
| 34 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 34 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 35 #include "content/common/intents_messages.h" | 35 #include "content/common/intents_messages.h" |
| 36 #include "content/common/java_bridge_messages.h" | 36 #include "content/common/java_bridge_messages.h" |
| 37 #include "content/common/pepper_messages.h" | 37 #include "content/common/pepper_messages.h" |
| 38 #include "content/common/pepper_plugin_registry.h" | 38 #include "content/common/pepper_plugin_registry.h" |
| 39 #include "content/common/quota_dispatcher.h" | 39 #include "content/common/quota_dispatcher.h" |
| 40 #include "content/common/request_extra_data.h" | 40 #include "content/common/request_extra_data.h" |
| 41 #include "content/common/response_extra_data.h" | |
| 41 #include "content/common/view_messages.h" | 42 #include "content/common/view_messages.h" |
| 42 #include "content/public/common/bindings_policy.h" | 43 #include "content/public/common/bindings_policy.h" |
| 43 #include "content/public/common/content_constants.h" | 44 #include "content/public/common/content_constants.h" |
| 44 #include "content/public/common/content_switches.h" | 45 #include "content/public/common/content_switches.h" |
| 45 #include "content/public/common/context_menu_params.h" | 46 #include "content/public/common/context_menu_params.h" |
| 46 #include "content/public/common/file_chooser_params.h" | 47 #include "content/public/common/file_chooser_params.h" |
| 47 #include "content/public/common/url_constants.h" | 48 #include "content/public/common/url_constants.h" |
| 48 #include "content/public/renderer/content_renderer_client.h" | 49 #include "content/public/renderer/content_renderer_client.h" |
| 49 #include "content/public/renderer/document_state.h" | 50 #include "content/public/renderer/document_state.h" |
| 50 #include "content/public/renderer/navigation_state.h" | 51 #include "content/public/renderer/navigation_state.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 #include "webkit/forms/form_data.h" | 153 #include "webkit/forms/form_data.h" |
| 153 #include "webkit/forms/form_field.h" | 154 #include "webkit/forms/form_field.h" |
| 154 #include "webkit/forms/password_form_dom_manager.h" | 155 #include "webkit/forms/password_form_dom_manager.h" |
| 155 #include "webkit/glue/alt_error_page_resource_fetcher.h" | 156 #include "webkit/glue/alt_error_page_resource_fetcher.h" |
| 156 #include "webkit/glue/dom_operations.h" | 157 #include "webkit/glue/dom_operations.h" |
| 157 #include "webkit/glue/glue_serialize.h" | 158 #include "webkit/glue/glue_serialize.h" |
| 158 #include "webkit/glue/webdropdata.h" | 159 #include "webkit/glue/webdropdata.h" |
| 159 #include "webkit/glue/webkit_constants.h" | 160 #include "webkit/glue/webkit_constants.h" |
| 160 #include "webkit/glue/webkit_glue.h" | 161 #include "webkit/glue/webkit_glue.h" |
| 161 #include "webkit/glue/weburlloader_impl.h" | 162 #include "webkit/glue/weburlloader_impl.h" |
| 163 #include "webkit/glue/weburlresponse_extradata_impl.h" | |
| 162 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 164 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 163 #include "webkit/media/webmediaplayer_impl.h" | 165 #include "webkit/media/webmediaplayer_impl.h" |
| 164 #include "webkit/plugins/npapi/plugin_list.h" | 166 #include "webkit/plugins/npapi/plugin_list.h" |
| 165 #include "webkit/plugins/npapi/webplugin_delegate.h" | 167 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 166 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 168 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 167 #include "webkit/plugins/npapi/webplugin_impl.h" | 169 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 168 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 170 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 169 | 171 |
| 170 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
| 171 // TODO(port): these files are currently Windows only because they concern: | 173 // TODO(port): these files are currently Windows only because they concern: |
| (...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2996 if (frame->isViewSourceModeEnabled()) | 2998 if (frame->isViewSourceModeEnabled()) |
| 2997 return; | 2999 return; |
| 2998 | 3000 |
| 2999 DocumentState* document_state = | 3001 DocumentState* document_state = |
| 3000 DocumentState::FromDataSource(frame->provisionalDataSource()); | 3002 DocumentState::FromDataSource(frame->provisionalDataSource()); |
| 3001 int http_status_code = response.httpStatusCode(); | 3003 int http_status_code = response.httpStatusCode(); |
| 3002 | 3004 |
| 3003 // Record page load flags. | 3005 // Record page load flags. |
| 3004 document_state->set_was_fetched_via_spdy(response.wasFetchedViaSPDY()); | 3006 document_state->set_was_fetched_via_spdy(response.wasFetchedViaSPDY()); |
| 3005 document_state->set_was_npn_negotiated(response.wasNpnNegotiated()); | 3007 document_state->set_was_npn_negotiated(response.wasNpnNegotiated()); |
| 3008 webkit_glue::WebURLResponseExtraDataImpl* extra_data = | |
| 3009 static_cast<webkit_glue::WebURLResponseExtraDataImpl*>( | |
| 3010 response.extraData()); | |
|
Ryan Sleevi
2012/02/17 05:37:08
Would this make more sense as a helper function on
ramant (doing other things)
2012/02/17 21:47:35
Done.
| |
| 3011 document_state->set_npn_negotiated_protocol( | |
| 3012 extra_data->npn_negotiated_protocol()); | |
| 3006 document_state->set_was_alternate_protocol_available( | 3013 document_state->set_was_alternate_protocol_available( |
| 3007 response.wasAlternateProtocolAvailable()); | 3014 response.wasAlternateProtocolAvailable()); |
| 3008 document_state->set_was_fetched_via_proxy(response.wasFetchedViaProxy()); | 3015 document_state->set_was_fetched_via_proxy(response.wasFetchedViaProxy()); |
| 3009 document_state->set_http_status_code(http_status_code); | 3016 document_state->set_http_status_code(http_status_code); |
| 3010 // Whether or not the http status code actually corresponds to an error is | 3017 // Whether or not the http status code actually corresponds to an error is |
| 3011 // only checked when the page is done loading, if |use_error_page| is | 3018 // only checked when the page is done loading, if |use_error_page| is |
| 3012 // still true. | 3019 // still true. |
| 3013 document_state->set_use_error_page(true); | 3020 document_state->set_use_error_page(true); |
| 3014 } | 3021 } |
| 3015 | 3022 |
| (...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5045 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5052 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5046 return !!RenderThreadImpl::current()->compositor_thread(); | 5053 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5047 } | 5054 } |
| 5048 | 5055 |
| 5049 void RenderViewImpl::OnJavaBridgeInit() { | 5056 void RenderViewImpl::OnJavaBridgeInit() { |
| 5050 DCHECK(!java_bridge_dispatcher_.get()); | 5057 DCHECK(!java_bridge_dispatcher_.get()); |
| 5051 #if defined(ENABLE_JAVA_BRIDGE) | 5058 #if defined(ENABLE_JAVA_BRIDGE) |
| 5052 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5059 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5053 #endif | 5060 #endif |
| 5054 } | 5061 } |
| OLD | NEW |