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

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

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Address Comments 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
Index: device/vr/android/gvr/gvr_gamepad_data_fetcher.h
diff --git a/device/vr/android/gvr/gvr_gamepad_data_fetcher.h b/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
index 4c5452fe436772b8f3d07891556877c77c7836e2..192498f6eff1cc2c769ce621afad26a1f816dd01 100644
--- a/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
+++ b/device/vr/android/gvr/gvr_gamepad_data_fetcher.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/memory/weak_ptr.h"
#include "device/gamepad/gamepad_data_fetcher.h"
#include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_controller.h"
#include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_types.h"
@@ -19,13 +20,13 @@ class GvrGamepadDataFetcher : public GamepadDataFetcher {
public:
class Factory : public GamepadDataFetcherFactory {
public:
- Factory(GvrDelegate* delegate, unsigned int display_id);
+ Factory(base::WeakPtr<GvrDelegate> delegate, unsigned int display_id);
dcheng 2016/11/12 02:03:31 Nit: const base::WeakPtr<>&
mthiesse 2016/11/14 16:41:38 Done.
~Factory() override;
std::unique_ptr<GamepadDataFetcher> CreateDataFetcher() override;
GamepadSource source() override;
private:
- GvrDelegate* delegate_;
+ base::WeakPtr<GvrDelegate> delegate_;
unsigned int display_id_;
};

Powered by Google App Engine
This is Rietveld 408576698