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

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: 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_provider.cc ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2e16c0b5d76ff8cbc2f40c22890bb3d05c99172d 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,14 @@ class GvrGamepadDataFetcher : public GamepadDataFetcher {
public:
class Factory : public GamepadDataFetcherFactory {
public:
- Factory(GvrDelegate* delegate, unsigned int display_id);
+ Factory(const base::WeakPtr<GvrDelegate>& delegate,
+ unsigned int display_id);
~Factory() override;
std::unique_ptr<GamepadDataFetcher> CreateDataFetcher() override;
GamepadSource source() override;
private:
- GvrDelegate* delegate_;
+ base::WeakPtr<GvrDelegate> delegate_;
unsigned int display_id_;
};
« no previous file with comments | « device/vr/android/gvr/gvr_device_provider.cc ('k') | device/vr/android/gvr/gvr_gamepad_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698