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

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

Issue 1808203005: [OnionSoup] Moving VR service from content to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked as per new comments. Fixed build errors! Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 #if defined(ENABLE_MOJO_RENDERER) 233 #if defined(ENABLE_MOJO_RENDERER)
234 #include "media/mojo/services/mojo_renderer_factory.h" // nogncheck 234 #include "media/mojo/services/mojo_renderer_factory.h" // nogncheck
235 #else 235 #else
236 #include "media/renderers/default_renderer_factory.h" 236 #include "media/renderers/default_renderer_factory.h"
237 #endif 237 #endif
238 238
239 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER) 239 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER)
240 #include "media/mojo/services/mojo_decoder_factory.h" // nogncheck 240 #include "media/mojo/services/mojo_decoder_factory.h" // nogncheck
241 #endif 241 #endif
242 242
243 #if defined(ENABLE_WEBVR)
244 #include "content/renderer/vr/vr_dispatcher.h"
245 #endif
246
247 using blink::WebCachePolicy; 243 using blink::WebCachePolicy;
248 using blink::WebContentDecryptionModule; 244 using blink::WebContentDecryptionModule;
249 using blink::WebContextMenuData; 245 using blink::WebContextMenuData;
250 using blink::WebCString; 246 using blink::WebCString;
251 using blink::WebData; 247 using blink::WebData;
252 using blink::WebDataSource; 248 using blink::WebDataSource;
253 using blink::WebDocument; 249 using blink::WebDocument;
254 using blink::WebDOMEvent; 250 using blink::WebDOMEvent;
255 using blink::WebDOMMessageEvent; 251 using blink::WebDOMMessageEvent;
256 using blink::WebElement; 252 using blink::WebElement;
(...skipping 4022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4279 // ChildThreadImpl::current() is null in some tests. 4275 // ChildThreadImpl::current() is null in some tests.
4280 if (!bluetooth_ && ChildThreadImpl::current()) { 4276 if (!bluetooth_ && ChildThreadImpl::current()) {
4281 bluetooth_.reset(new WebBluetoothImpl( 4277 bluetooth_.reset(new WebBluetoothImpl(
4282 GetServiceRegistry(), ChildThreadImpl::current()->thread_safe_sender(), 4278 GetServiceRegistry(), ChildThreadImpl::current()->thread_safe_sender(),
4283 routing_id_)); 4279 routing_id_));
4284 } 4280 }
4285 4281
4286 return bluetooth_.get(); 4282 return bluetooth_.get();
4287 } 4283 }
4288 4284
4289 #if defined(ENABLE_WEBVR)
4290 blink::WebVRClient* RenderFrameImpl::webVRClient() {
4291 if (!vr_dispatcher_)
4292 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry()));
4293
4294 return vr_dispatcher_.get();
4295 }
4296 #endif
4297
4298 void RenderFrameImpl::didSerializeDataForFrame( 4285 void RenderFrameImpl::didSerializeDataForFrame(
4299 const WebCString& data, 4286 const WebCString& data,
4300 WebFrameSerializerClient::FrameSerializationStatus status) { 4287 WebFrameSerializerClient::FrameSerializationStatus status) {
4301 bool end_of_data = status == WebFrameSerializerClient::CurrentFrameIsFinished; 4288 bool end_of_data = status == WebFrameSerializerClient::CurrentFrameIsFinished;
4302 Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse( 4289 Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse(
4303 routing_id_, data, end_of_data)); 4290 routing_id_, data, end_of_data));
4304 } 4291 }
4305 4292
4306 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { 4293 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) {
4307 observers_.AddObserver(observer); 4294 observers_.AddObserver(observer);
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
6031 int match_count, 6018 int match_count,
6032 int ordinal, 6019 int ordinal,
6033 const WebRect& selection_rect, 6020 const WebRect& selection_rect,
6034 bool final_status_update) { 6021 bool final_status_update) {
6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6022 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6036 selection_rect, ordinal, 6023 selection_rect, ordinal,
6037 final_status_update)); 6024 final_status_update));
6038 } 6025 }
6039 6026
6040 } // namespace content 6027 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698