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

Side by Side Diff: content/renderer/vr_dispatcher.h

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tedchoc@'s feedback 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_VR_DISPATCHER_H_
6 #define CONTENT_RENDERER_VR_DISPATCHER_H_
7
8 #include "base/id_map.h"
9 #include "content/public/renderer/render_frame_observer.h"
10 #include "third_party/WebKit/public/platform/WebVR.h"
11 #include "third_party/WebKit/public/platform/WebVRClient.h"
12 #include "third_party/WebKit/public/platform/WebVector.h"
13
14 namespace content {
15
16 class VRDispatcher :
17 public RenderFrameObserver,
18 NON_EXPORTED_BASE(public blink::WebVRClient){
mdempsky 2015/05/11 19:25:02 Nit: Missing a space between ")" and "{". Please
19 public:
20 VRDispatcher(RenderFrame* render_frame);
mdempsky 2015/05/11 19:25:01 Nit: Add "explicit".
21 ~VRDispatcher();
22
23 // RenderFrameObserver implementation.
24 bool OnMessageReceived(const IPC::Message& message) override;
25
26 // blink::WebVRClient implementation.
mdempsky 2015/05/11 19:25:01 Since blink::WebVRClient is a private base class,
mdempsky 2015/05/11 19:34:47 Oops, disregard this. I misunderstood the purpose
27 void getDevices(blink::WebVRGetDevicesCallback* callback) override;
28
29 void getSensorState(
30 unsigned int index, blink::WebHMDSensorState& state) override;
31
32 void resetSensor(unsigned int index) override;
33
34 private:
35 // IPC Handlers
36 void OnGetDevicesSuccess(int request_id,
37 const std::vector<blink::WebVRDevice>& devices);
38 void OnGetDevicesError(int request_id);
39
40 // Tracks requests sent to browser to match replies with callbacks.
41 // Owns callback objects.
42 IDMap<blink::WebVRGetDevicesCallback, IDMapOwnPointer> pending_requests_;
43
44
45 DISALLOW_COPY_AND_ASSIGN(VRDispatcher);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_RENDERER_VR_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698