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

Unified Diff: device/vr/android/gvr/gvr_device.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_delegate.h ('k') | device/vr/android/gvr/gvr_device.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.h
diff --git a/device/vr/android/gvr/gvr_device.h b/device/vr/android/gvr/gvr_device.h
index f1f0f4e13db10263b84c4c441093aaab8e105a58..4d57f581a64d2dab47c4978a4c6601f2379634eb 100644
--- a/device/vr/android/gvr/gvr_device.h
+++ b/device/vr/android/gvr/gvr_device.h
@@ -6,7 +6,6 @@
#define DEVICE_VR_ANDROID_GVR_DEVICE_H
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
#include "device/vr/vr_device.h"
namespace gvr {
@@ -20,8 +19,7 @@ class GvrDelegate;
class GvrDevice : public VRDevice {
public:
- GvrDevice(GvrDeviceProvider* provider,
- const base::WeakPtr<GvrDelegate>& delegate);
+ GvrDevice(GvrDeviceProvider* provider, GvrDelegate* delegate);
~GvrDevice() override;
// VRDevice
@@ -37,12 +35,12 @@ class GvrDevice : public VRDevice {
void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds,
mojom::VRLayerBoundsPtr right_bounds) override;
- void SetDelegate(const base::WeakPtr<GvrDelegate>& delegate);
+ void SetDelegate(GvrDelegate* delegate);
private:
gvr::GvrApi* GetGvrApi();
- base::WeakPtr<GvrDelegate> delegate_;
+ GvrDelegate* delegate_;
GvrDeviceProvider* gvr_provider_;
bool secure_origin_ = false;
uint32_t pose_index_ = 1;
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.h ('k') | device/vr/android/gvr/gvr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698