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

Side by Side Diff: public/platform/modules/vr/WebVRClient.h

Issue 1321763002: [VR, Permission] Use appopriate type parameters for WebCallbacks (3/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « public/platform/modules/permissions/WebPermissionClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef WebVRClient_h 5 #ifndef WebVRClient_h
6 #define WebVRClient_h 6 #define WebVRClient_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebVector.h" 9 #include "public/platform/WebVector.h"
10 #include "public/platform/modules/vr/WebVR.h" 10 #include "public/platform/modules/vr/WebVR.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 // Success and failure callbacks for getDevices. 14 // Success and failure callbacks for getDevices.
15 class WebVRGetDevicesCallback : public WebCallbacks<const WebVector<WebVRDevice> &, void> { 15 using WebVRGetDevicesCallback = WebCallbacks<const WebVector<WebVRDevice>&, void >;
16 public:
17 virtual void onSuccess(const WebVector<WebVRDevice>&) = 0;
18 void onSuccess(WebVector<WebVRDevice>* r) { onSuccess(*r); }
19 };
20 16
21 // Client handling VR device communication for a given WebFrame. 17 // Client handling VR device communication for a given WebFrame.
22 class WebVRClient { 18 class WebVRClient {
23 public: 19 public:
24 virtual ~WebVRClient() { } 20 virtual ~WebVRClient() { }
25 21
26 virtual void getDevices(WebVRGetDevicesCallback*) = 0; 22 virtual void getDevices(WebVRGetDevicesCallback*) = 0;
27 23
28 virtual void getSensorState(unsigned index, blink::WebHMDSensorState& into) = 0; 24 virtual void getSensorState(unsigned index, blink::WebHMDSensorState& into) = 0;
29 25
30 virtual void resetSensor(unsigned index) = 0; 26 virtual void resetSensor(unsigned index) = 0;
31 }; 27 };
32 28
33 } // namespace blink 29 } // namespace blink
34 30
35 #endif // WebVRClient_h 31 #endif // WebVRClient_h
OLDNEW
« no previous file with comments | « public/platform/modules/permissions/WebPermissionClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698