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

Side by Side Diff: device/vr/android/gvr/gvr_device_provider.h

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Rebase to 11e28fd6b9380b77273db51ef0b6ccc7ea341944 Created 3 years, 9 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
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "device/vr/vr_device_provider.h" 12 #include "device/vr/vr_device_provider.h"
13 #include "device/vr/vr_export.h" 13 #include "device/vr/vr_export.h"
14 #include "device/vr/vr_service.mojom.h"
14 15
15 namespace device { 16 namespace device {
16 17
18 class GvrDelegateProvider;
17 class GvrDevice; 19 class GvrDevice;
18 20
19 class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider { 21 class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
20 public: 22 public:
21 GvrDeviceProvider(); 23 GvrDeviceProvider();
22 ~GvrDeviceProvider() override; 24 ~GvrDeviceProvider() override;
23 25
24 void GetDevices(std::vector<VRDevice*>* devices) override; 26 void GetDevices(std::vector<VRDevice*>* devices) override;
25 void Initialize() override; 27 void Initialize() override;
26 28
27 void SetListeningForActivate(bool listening) override; 29 void SetListeningForActivate(bool listening) override;
28 30
29 // Called from GvrDevice. 31 // Called from GvrDevice.
30 void RequestPresent(const base::Callback<void(bool)>& callback); 32 void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
33 const base::Callback<void(bool)>& callback);
31 void ExitPresent(); 34 void ExitPresent();
32 35
36 device::GvrDelegateProvider* GetDelegateProvider();
37
33 GvrDevice* Device() { return vr_device_.get(); } 38 GvrDevice* Device() { return vr_device_.get(); }
34 39
35 private: 40 private:
41 void Initialize(device::GvrDelegateProvider* provider);
36 std::unique_ptr<GvrDevice> vr_device_; 42 std::unique_ptr<GvrDevice> vr_device_;
37 bool initialized_ = false;
38 43
39 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider); 44 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider);
40 }; 45 };
41 46
42 } // namespace device 47 } // namespace device
43 48
44 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H 49 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698