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

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

Issue 2570553004: Clean up some VrShell threading issues and remove unnecessary WeakPtr types. (Closed)
Patch Set: rebase Created 4 years 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 53284e3e705ee9fbd2f94b50138ad421cefb9dd6..6bbef04dff5ab38dee6caa92ddffa1f71e96e132 100644
--- a/device/vr/android/gvr/gvr_device_provider.h
+++ b/device/vr/android/gvr/gvr_device_provider.h
@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
#include "device/vr/vr_device_provider.h"
#include "device/vr/vr_export.h"
@@ -32,8 +31,12 @@ class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
void RequestPresent(const base::Callback<void(bool)>& callback);
void ExitPresent();
- void OnGvrDelegateReady(const base::WeakPtr<GvrDelegate>& delegate);
+ void OnGvrDelegateReady(GvrDelegate* delegate);
void OnGvrDelegateRemoved();
+
+ // TODO(mthiesse): Make the NonPresentingDelegate owned by this class so that
+ // it cannot be removed.
+ void OnNonPresentingDelegateRemoved();
void OnDisplayBlur();
void OnDisplayFocus();
void OnDisplayActivate();
@@ -43,8 +46,6 @@ class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
std::unique_ptr<GvrDevice> vr_device_;
- 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