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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 139 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 140 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 140 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 141 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 141 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
| 142 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" | 142 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" |
| 143 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" | 143 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" |
| 144 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 144 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 145 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 145 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " | 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " |
| 147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" | 147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" |
| 148 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" | 148 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" |
| 149 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody. h" | |
| 149 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" | 150 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
| 150 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00Handler.h" | 151 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00Handler.h" |
| 151 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00HandlerClient.h" | 152 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00HandlerClient.h" |
| 152 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" | 153 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" |
| 153 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" | 154 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" |
| 154 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" | 155 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" |
| 155 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | 156 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
| 156 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize dScriptValue.h" | 157 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize dScriptValue.h" |
| 157 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | 158 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
| 158 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr eamHandle.h" | 159 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr eamHandle.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 using WebKit::WebExternalPopupMenuClient; | 229 using WebKit::WebExternalPopupMenuClient; |
| 229 using WebKit::WebFileChooserCompletion; | 230 using WebKit::WebFileChooserCompletion; |
| 230 using WebKit::WebFileSystem; | 231 using WebKit::WebFileSystem; |
| 231 using WebKit::WebFileSystemCallbacks; | 232 using WebKit::WebFileSystemCallbacks; |
| 232 using WebKit::WebFindOptions; | 233 using WebKit::WebFindOptions; |
| 233 using WebKit::WebFormControlElement; | 234 using WebKit::WebFormControlElement; |
| 234 using WebKit::WebFormElement; | 235 using WebKit::WebFormElement; |
| 235 using WebKit::WebFrame; | 236 using WebKit::WebFrame; |
| 236 using WebKit::WebGraphicsContext3D; | 237 using WebKit::WebGraphicsContext3D; |
| 237 using WebKit::WebHistoryItem; | 238 using WebKit::WebHistoryItem; |
| 239 using WebKit::WebHTTPBody; | |
| 238 using WebKit::WebIconURL; | 240 using WebKit::WebIconURL; |
| 239 using WebKit::WebImage; | 241 using WebKit::WebImage; |
| 240 using WebKit::WebInputElement; | 242 using WebKit::WebInputElement; |
| 241 using WebKit::WebIntentRequest; | 243 using WebKit::WebIntentRequest; |
| 242 using WebKit::WebIntentServiceInfo; | 244 using WebKit::WebIntentServiceInfo; |
| 243 using WebKit::WebMediaPlayer; | 245 using WebKit::WebMediaPlayer; |
| 244 using WebKit::WebMediaPlayerAction; | 246 using WebKit::WebMediaPlayerAction; |
| 245 using WebKit::WebMediaPlayerClient; | 247 using WebKit::WebMediaPlayerClient; |
| 246 using WebKit::WebMouseEvent; | 248 using WebKit::WebMouseEvent; |
| 247 using WebKit::WebNavigationPolicy; | 249 using WebKit::WebNavigationPolicy; |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1081 } | 1083 } |
| 1082 | 1084 |
| 1083 if (!params.extra_headers.empty()) { | 1085 if (!params.extra_headers.empty()) { |
| 1084 for (net::HttpUtil::HeadersIterator i(params.extra_headers.begin(), | 1086 for (net::HttpUtil::HeadersIterator i(params.extra_headers.begin(), |
| 1085 params.extra_headers.end(), "\n"); | 1087 params.extra_headers.end(), "\n"); |
| 1086 i.GetNext(); ) { | 1088 i.GetNext(); ) { |
| 1087 request.addHTTPHeaderField(WebString::fromUTF8(i.name()), | 1089 request.addHTTPHeaderField(WebString::fromUTF8(i.name()), |
| 1088 WebString::fromUTF8(i.values())); | 1090 WebString::fromUTF8(i.values())); |
| 1089 } | 1091 } |
| 1090 } | 1092 } |
| 1093 | |
| 1094 if (params.is_post) { | |
| 1095 request.setHTTPMethod(WebString::fromUTF8("POST")); | |
| 1096 | |
| 1097 // set post data | |
|
jam
2012/07/27 23:36:15
nit: capitalization and period per the style guide
| |
| 1098 WebHTTPBody http_body; | |
| 1099 http_body.initialize(); | |
| 1100 http_body.appendData(WebData( | |
| 1101 ¶ms.browser_initiated_post_data.front(), | |
| 1102 params.browser_initiated_post_data.size())); | |
| 1103 request.setHTTPBody(http_body); | |
| 1104 } | |
| 1105 | |
| 1091 main_frame->loadRequest(request); | 1106 main_frame->loadRequest(request); |
| 1092 } | 1107 } |
| 1093 | 1108 |
| 1094 // In case LoadRequest failed before DidCreateDataSource was called. | 1109 // In case LoadRequest failed before DidCreateDataSource was called. |
| 1095 pending_navigation_params_.reset(); | 1110 pending_navigation_params_.reset(); |
| 1096 } | 1111 } |
| 1097 | 1112 |
| 1098 bool RenderViewImpl::IsBackForwardToStaleEntry( | 1113 bool RenderViewImpl::IsBackForwardToStaleEntry( |
| 1099 const ViewMsg_Navigate_Params& params, | 1114 const ViewMsg_Navigate_Params& params, |
| 1100 bool is_reload) { | 1115 bool is_reload) { |
| (...skipping 4614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5715 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5730 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5716 return !!RenderThreadImpl::current()->compositor_thread(); | 5731 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5717 } | 5732 } |
| 5718 | 5733 |
| 5719 void RenderViewImpl::OnJavaBridgeInit() { | 5734 void RenderViewImpl::OnJavaBridgeInit() { |
| 5720 DCHECK(!java_bridge_dispatcher_); | 5735 DCHECK(!java_bridge_dispatcher_); |
| 5721 #if defined(ENABLE_JAVA_BRIDGE) | 5736 #if defined(ENABLE_JAVA_BRIDGE) |
| 5722 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5737 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5723 #endif | 5738 #endif |
| 5724 } | 5739 } |
| OLD | NEW |