Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 9677031: Bind RenderViewImpl routing_id to SocketStreamHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: follow WebKit side renaming Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" 130 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
131 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 131 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
132 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" 132 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h"
133 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" 133 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h"
134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" 134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" 135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" 136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h"
137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" 137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" 138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr eamHandle.h"
140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
146 #include "third_party/skia/include/core/SkBitmap.h" 147 #include "third_party/skia/include/core/SkBitmap.h"
147 #include "ui/base/javascript_message_type.h" 148 #include "ui/base/javascript_message_type.h"
148 #include "ui/gfx/native_widget_types.h" 149 #include "ui/gfx/native_widget_types.h"
149 #include "ui/gfx/point.h" 150 #include "ui/gfx/point.h"
150 #include "ui/gfx/rect.h" 151 #include "ui/gfx/rect.h"
151 #include "v8/include/v8.h" 152 #include "v8/include/v8.h"
152 #include "webkit/appcache/web_application_cache_host_impl.h" 153 #include "webkit/appcache/web_application_cache_host_impl.h"
153 #include "webkit/forms/form_data.h" 154 #include "webkit/forms/form_data.h"
154 #include "webkit/forms/form_field.h" 155 #include "webkit/forms/form_field.h"
155 #include "webkit/forms/password_form_dom_manager.h" 156 #include "webkit/forms/password_form_dom_manager.h"
156 #include "webkit/glue/alt_error_page_resource_fetcher.h" 157 #include "webkit/glue/alt_error_page_resource_fetcher.h"
157 #include "webkit/glue/dom_operations.h" 158 #include "webkit/glue/dom_operations.h"
158 #include "webkit/glue/glue_serialize.h" 159 #include "webkit/glue/glue_serialize.h"
159 #include "webkit/glue/webdropdata.h" 160 #include "webkit/glue/webdropdata.h"
160 #include "webkit/glue/webkit_constants.h" 161 #include "webkit/glue/webkit_constants.h"
161 #include "webkit/glue/webkit_glue.h" 162 #include "webkit/glue/webkit_glue.h"
163 #include "webkit/glue/websocketstreamhandle_impl.h"
162 #include "webkit/glue/weburlloader_impl.h" 164 #include "webkit/glue/weburlloader_impl.h"
163 #include "webkit/glue/weburlresponse_extradata_impl.h" 165 #include "webkit/glue/weburlresponse_extradata_impl.h"
164 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 166 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
165 #include "webkit/media/webmediaplayer_impl.h" 167 #include "webkit/media/webmediaplayer_impl.h"
166 #include "webkit/plugins/npapi/plugin_list.h" 168 #include "webkit/plugins/npapi/plugin_list.h"
167 #include "webkit/plugins/npapi/webplugin_delegate.h" 169 #include "webkit/plugins/npapi/webplugin_delegate.h"
168 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 170 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
169 #include "webkit/plugins/npapi/webplugin_impl.h" 171 #include "webkit/plugins/npapi/webplugin_impl.h"
170 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" 172 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
171 173
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 using WebKit::WebRange; 234 using WebKit::WebRange;
233 using WebKit::WebRect; 235 using WebKit::WebRect;
234 using WebKit::WebReferrerPolicy; 236 using WebKit::WebReferrerPolicy;
235 using WebKit::WebScriptSource; 237 using WebKit::WebScriptSource;
236 using WebKit::WebSearchableFormData; 238 using WebKit::WebSearchableFormData;
237 using WebKit::WebSecurityOrigin; 239 using WebKit::WebSecurityOrigin;
238 using WebKit::WebSecurityPolicy; 240 using WebKit::WebSecurityPolicy;
239 using WebKit::WebSettings; 241 using WebKit::WebSettings;
240 using WebKit::WebSharedWorker; 242 using WebKit::WebSharedWorker;
241 using WebKit::WebSize; 243 using WebKit::WebSize;
244 using WebKit::WebSocketStreamHandle;
242 using WebKit::WebStorageNamespace; 245 using WebKit::WebStorageNamespace;
243 using WebKit::WebStorageQuotaCallbacks; 246 using WebKit::WebStorageQuotaCallbacks;
244 using WebKit::WebStorageQuotaError; 247 using WebKit::WebStorageQuotaError;
245 using WebKit::WebStorageQuotaType; 248 using WebKit::WebStorageQuotaType;
246 using WebKit::WebString; 249 using WebKit::WebString;
247 using WebKit::WebTextAffinity; 250 using WebKit::WebTextAffinity;
248 using WebKit::WebTextDirection; 251 using WebKit::WebTextDirection;
249 using WebKit::WebTouchEvent; 252 using WebKit::WebTouchEvent;
250 using WebKit::WebURL; 253 using WebKit::WebURL;
251 using WebKit::WebURLError; 254 using WebKit::WebURLError;
(...skipping 11 matching lines...) Expand all
263 using content::RenderThread; 266 using content::RenderThread;
264 using content::RenderViewObserver; 267 using content::RenderViewObserver;
265 using content::RenderViewVisitor; 268 using content::RenderViewVisitor;
266 using content::Referrer; 269 using content::Referrer;
267 using content::V8ValueConverter; 270 using content::V8ValueConverter;
268 using webkit::forms::FormField; 271 using webkit::forms::FormField;
269 using webkit::forms::PasswordForm; 272 using webkit::forms::PasswordForm;
270 using webkit::forms::PasswordFormDomManager; 273 using webkit::forms::PasswordFormDomManager;
271 using webkit_glue::AltErrorPageResourceFetcher; 274 using webkit_glue::AltErrorPageResourceFetcher;
272 using webkit_glue::ResourceFetcher; 275 using webkit_glue::ResourceFetcher;
276 using webkit_glue::WebSocketStreamHandleImpl;
273 using webkit_glue::WebURLResponseExtraDataImpl; 277 using webkit_glue::WebURLResponseExtraDataImpl;
274 278
275 //----------------------------------------------------------------------------- 279 //-----------------------------------------------------------------------------
276 280
277 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; 281 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap;
278 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; 282 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER;
279 283
280 // Time, in seconds, we delay before sending content state changes (such as form 284 // Time, in seconds, we delay before sending content state changes (such as form
281 // state and scroll position) to the browser. We delay sending changes to avoid 285 // state and scroll position) to the browser. We delay sending changes to avoid
282 // spamming the browser. 286 // spamming the browser.
(...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 } 3367 }
3364 3368
3365 void RenderViewImpl::dispatchIntent( 3369 void RenderViewImpl::dispatchIntent(
3366 WebFrame* frame, const WebIntentRequest& intentRequest) { 3370 WebFrame* frame, const WebIntentRequest& intentRequest) {
3367 webkit_glue::WebIntentData intent_data(intentRequest.intent()); 3371 webkit_glue::WebIntentData intent_data(intentRequest.intent());
3368 int id = intents_host_->RegisterWebIntent(intentRequest); 3372 int id = intents_host_->RegisterWebIntent(intentRequest);
3369 Send(new IntentsHostMsg_WebIntentDispatch( 3373 Send(new IntentsHostMsg_WebIntentDispatch(
3370 routing_id_, intent_data, id)); 3374 routing_id_, intent_data, id));
3371 } 3375 }
3372 3376
3377 void RenderViewImpl::willOpenSocketStream(
3378 WebSocketStreamHandle* handle) {
3379 WebSocketStreamHandleImpl* impl =
3380 static_cast<WebSocketStreamHandleImpl*>(handle);
3381 if (impl)
3382 impl->SetRequestorId(routing_id_);
3383 }
3384
3373 // WebKit::WebPageSerializerClient implementation ------------------------------ 3385 // WebKit::WebPageSerializerClient implementation ------------------------------
3374 3386
3375 void RenderViewImpl::didSerializeDataForFrame( 3387 void RenderViewImpl::didSerializeDataForFrame(
3376 const WebURL& frame_url, 3388 const WebURL& frame_url,
3377 const WebCString& data, 3389 const WebCString& data,
3378 WebPageSerializerClient::PageSerializationStatus status) { 3390 WebPageSerializerClient::PageSerializationStatus status) {
3379 Send(new ViewHostMsg_SendSerializedHtmlData( 3391 Send(new ViewHostMsg_SendSerializedHtmlData(
3380 routing_id(), 3392 routing_id(),
3381 frame_url, 3393 frame_url,
3382 data.data(), 3394 data.data(),
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
5130 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5142 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5131 return !!RenderThreadImpl::current()->compositor_thread(); 5143 return !!RenderThreadImpl::current()->compositor_thread();
5132 } 5144 }
5133 5145
5134 void RenderViewImpl::OnJavaBridgeInit() { 5146 void RenderViewImpl::OnJavaBridgeInit() {
5135 DCHECK(!java_bridge_dispatcher_.get()); 5147 DCHECK(!java_bridge_dispatcher_.get());
5136 #if defined(ENABLE_JAVA_BRIDGE) 5148 #if defined(ENABLE_JAVA_BRIDGE)
5137 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5149 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5138 #endif 5150 #endif
5139 } 5151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698