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

Unified Diff: device/vr/android/gvr/gvr_device_provider.h

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_device_provider.h
diff --git a/device/vr/android/gvr/gvr_device_provider.h b/device/vr/android/gvr/gvr_device_provider.h
index 02f77583ffe40b6b46863e8073ab45194a29c8a0..53f01abf603e76b75ec81659f2dad0a456024ddd 100644
--- a/device/vr/android/gvr/gvr_device_provider.h
+++ b/device/vr/android/gvr/gvr_device_provider.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "device/vr/vr_device.h"
#include "device/vr/vr_device_provider.h"
@@ -27,21 +28,19 @@ class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
void GetDevices(std::vector<VRDevice*>* devices) override;
void Initialize() override;
- // Called from GvrDevice
+ // Called from GvrDevice.
bool RequestPresent();
void ExitPresent();
- // Called from GvrDelegate
- void OnGvrDelegateReady(GvrDelegate* delegate);
+ void OnGvrDelegateReady(const base::WeakPtr<GvrDelegate>& delegate);
void OnGvrDelegateRemoved();
+ void OnDisplayBlur();
+ void OnDisplayFocus();
private:
- void GvrDelegateReady(GvrDelegate* delegate);
- void GvrDelegateRemoved();
-
std::unique_ptr<GvrDevice> vr_device_;
- scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
+ base::WeakPtrFactory<GvrDeviceProvider> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider);
};
« 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