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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved cardboard-java gyp and gn config into third_party Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3cf9e9b856fb9c83a4485e4129e9acf60d8d37c9..8bb2439498d8fb7e2e5ba2d18c9a4d84484d1a87 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -102,6 +102,7 @@
#include "content/renderer/shared_worker_repository.h"
#include "content/renderer/skia_benchmarking_extension.h"
#include "content/renderer/stats_collection_controller.h"
+#include "content/renderer/vr_dispatcher.h"
#include "content/renderer/web_ui_extension.h"
#include "content/renderer/websharedworker_proxy.h"
#include "gin/modules/module_registry.h"
@@ -689,6 +690,7 @@ RenderFrameImpl::RenderFrameImpl(RenderViewImpl* render_view, int routing_id)
manifest_manager_(NULL),
accessibility_mode_(AccessibilityModeOff),
renderer_accessibility_(NULL),
+ vr_dispatcher_(NULL),
weak_factory_(this) {
std::pair<RoutingIDFrameMap::iterator, bool> result =
g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
@@ -3793,6 +3795,14 @@ blink::WebPermissionClient* RenderFrameImpl::permissionClient() {
return permission_client_.get();
}
+blink::WebVRClient* RenderFrameImpl::webVRClient() {
+ if (!vr_dispatcher_)
+ vr_dispatcher_ = new VRDispatcher(this);
Ted C 2015/04/24 01:06:07 who deletes this? should it be a scoped_ptr like
+
+ return vr_dispatcher_;
+}
+
Ted C 2015/04/24 01:06:07 extra blank line here.
+
void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) {
Send(new FrameHostMsg_MediaPlayingNotification(
routing_id_, reinterpret_cast<int64>(player), player->hasVideo(),

Powered by Google App Engine
This is Rietveld 408576698