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

Side by Side 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 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 #include "content/renderer/render_process.h" 95 #include "content/renderer/render_process.h"
96 #include "content/renderer/render_thread_impl.h" 96 #include "content/renderer/render_thread_impl.h"
97 #include "content/renderer/render_view_impl.h" 97 #include "content/renderer/render_view_impl.h"
98 #include "content/renderer/render_widget_fullscreen_pepper.h" 98 #include "content/renderer/render_widget_fullscreen_pepper.h"
99 #include "content/renderer/renderer_webapplicationcachehost_impl.h" 99 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
100 #include "content/renderer/renderer_webcolorchooser_impl.h" 100 #include "content/renderer/renderer_webcolorchooser_impl.h"
101 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" 101 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
102 #include "content/renderer/shared_worker_repository.h" 102 #include "content/renderer/shared_worker_repository.h"
103 #include "content/renderer/skia_benchmarking_extension.h" 103 #include "content/renderer/skia_benchmarking_extension.h"
104 #include "content/renderer/stats_collection_controller.h" 104 #include "content/renderer/stats_collection_controller.h"
105 #include "content/renderer/vr_dispatcher.h"
105 #include "content/renderer/web_ui_extension.h" 106 #include "content/renderer/web_ui_extension.h"
106 #include "content/renderer/websharedworker_proxy.h" 107 #include "content/renderer/websharedworker_proxy.h"
107 #include "gin/modules/module_registry.h" 108 #include "gin/modules/module_registry.h"
108 #include "media/base/audio_renderer_mixer_input.h" 109 #include "media/base/audio_renderer_mixer_input.h"
109 #include "media/base/media_log.h" 110 #include "media/base/media_log.h"
110 #include "media/blink/webencryptedmediaclient_impl.h" 111 #include "media/blink/webencryptedmediaclient_impl.h"
111 #include "media/blink/webmediaplayer_impl.h" 112 #include "media/blink/webmediaplayer_impl.h"
112 #include "media/blink/webmediaplayer_params.h" 113 #include "media/blink/webmediaplayer_params.h"
113 #include "media/renderers/gpu_video_accelerator_factories.h" 114 #include "media/renderers/gpu_video_accelerator_factories.h"
114 #include "net/base/data_url.h" 115 #include "net/base/data_url.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 contains_media_player_(false), 683 contains_media_player_(false),
683 #endif 684 #endif
684 devtools_agent_(nullptr), 685 devtools_agent_(nullptr),
685 geolocation_dispatcher_(NULL), 686 geolocation_dispatcher_(NULL),
686 push_messaging_dispatcher_(NULL), 687 push_messaging_dispatcher_(NULL),
687 presentation_dispatcher_(NULL), 688 presentation_dispatcher_(NULL),
688 screen_orientation_dispatcher_(NULL), 689 screen_orientation_dispatcher_(NULL),
689 manifest_manager_(NULL), 690 manifest_manager_(NULL),
690 accessibility_mode_(AccessibilityModeOff), 691 accessibility_mode_(AccessibilityModeOff),
691 renderer_accessibility_(NULL), 692 renderer_accessibility_(NULL),
693 vr_dispatcher_(NULL),
692 weak_factory_(this) { 694 weak_factory_(this) {
693 std::pair<RoutingIDFrameMap::iterator, bool> result = 695 std::pair<RoutingIDFrameMap::iterator, bool> result =
694 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 696 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
695 CHECK(result.second) << "Inserting a duplicate item."; 697 CHECK(result.second) << "Inserting a duplicate item.";
696 698
697 RenderThread::Get()->AddRoute(routing_id_, this); 699 RenderThread::Get()->AddRoute(routing_id_, this);
698 700
699 render_view_->RegisterRenderFrame(this); 701 render_view_->RegisterRenderFrame(this);
700 702
701 // Everything below subclasses RenderFrameObserver and is automatically 703 // Everything below subclasses RenderFrameObserver and is automatically
(...skipping 3084 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 return true; 3788 return true;
3787 } 3789 }
3788 3790
3789 blink::WebPermissionClient* RenderFrameImpl::permissionClient() { 3791 blink::WebPermissionClient* RenderFrameImpl::permissionClient() {
3790 if (!permission_client_) 3792 if (!permission_client_)
3791 permission_client_.reset(new PermissionDispatcher(GetServiceRegistry())); 3793 permission_client_.reset(new PermissionDispatcher(GetServiceRegistry()));
3792 3794
3793 return permission_client_.get(); 3795 return permission_client_.get();
3794 } 3796 }
3795 3797
3798 blink::WebVRClient* RenderFrameImpl::webVRClient() {
3799 if (!vr_dispatcher_)
3800 vr_dispatcher_ = new VRDispatcher(this);
Ted C 2015/04/24 01:06:07 who deletes this? should it be a scoped_ptr like
3801
3802 return vr_dispatcher_;
3803 }
3804
Ted C 2015/04/24 01:06:07 extra blank line here.
3805
3796 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) { 3806 void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) {
3797 Send(new FrameHostMsg_MediaPlayingNotification( 3807 Send(new FrameHostMsg_MediaPlayingNotification(
3798 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), 3808 routing_id_, reinterpret_cast<int64>(player), player->hasVideo(),
3799 player->hasAudio(), player->isRemote())); 3809 player->hasAudio(), player->isRemote()));
3800 } 3810 }
3801 3811
3802 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) { 3812 void RenderFrameImpl::DidPause(blink::WebMediaPlayer* player) {
3803 Send(new FrameHostMsg_MediaPausedNotification( 3813 Send(new FrameHostMsg_MediaPausedNotification(
3804 routing_id_, reinterpret_cast<int64>(player))); 3814 routing_id_, reinterpret_cast<int64>(player)));
3805 } 3815 }
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4857 #elif defined(ENABLE_BROWSER_CDMS) 4867 #elif defined(ENABLE_BROWSER_CDMS)
4858 cdm_manager_, 4868 cdm_manager_,
4859 #endif 4869 #endif
4860 this); 4870 this);
4861 } 4871 }
4862 4872
4863 return cdm_factory_; 4873 return cdm_factory_;
4864 } 4874 }
4865 4875
4866 } // namespace content 4876 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698