| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 
| 7 | 7 | 
| 8 #include <jni.h> | 8 #include <jni.h> | 
| 9 | 9 | 
| 10 #include <memory> | 10 #include <memory> | 
| 11 | 11 | 
| 12 #include "base/android/jni_weak_ref.h" | 12 #include "base/android/jni_weak_ref.h" | 
| 13 #include "base/callback.h" | 13 #include "base/callback.h" | 
| 14 #include "base/macros.h" | 14 #include "base/macros.h" | 
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" | 
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" | 
| 17 #include "chrome/browser/android/vr_shell/ui_interface.h" | 17 #include "chrome/browser/android/vr_shell/ui_interface.h" | 
|  | 18 #include "chrome/browser/android/vr_shell/ui_unsupported_mode.h" | 
| 18 #include "chrome/browser/android/vr_shell/vr_controller_model.h" | 19 #include "chrome/browser/android/vr_shell/vr_controller_model.h" | 
| 19 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" | 
| 20 #include "device/vr/android/gvr/cardboard_gamepad_data_provider.h" | 21 #include "device/vr/android/gvr/cardboard_gamepad_data_provider.h" | 
| 21 #include "device/vr/android/gvr/gvr_delegate.h" | 22 #include "device/vr/android/gvr/gvr_delegate.h" | 
| 22 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" | 23 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" | 
| 23 #include "device/vr/vr_service.mojom.h" | 24 #include "device/vr/vr_service.mojom.h" | 
| 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
     gvr.h" | 25 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
     gvr.h" | 
| 25 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
     gvr_types.h" | 26 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
     gvr_types.h" | 
| 26 | 27 | 
| 27 namespace blink { | 28 namespace blink { | 
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 154   void DoUiAction(const UiAction action, | 155   void DoUiAction(const UiAction action, | 
| 155                   const base::DictionaryValue* arguments); | 156                   const base::DictionaryValue* arguments); | 
| 156 | 157 | 
| 157   void SetContentCssSize(float width, float height, float dpr); | 158   void SetContentCssSize(float width, float height, float dpr); | 
| 158 | 159 | 
| 159   void ContentFrameWasResized(bool width_changed); | 160   void ContentFrameWasResized(bool width_changed); | 
| 160 | 161 | 
| 161   void ForceExitVr(); | 162   void ForceExitVr(); | 
| 162   void ExitPresent(); | 163   void ExitPresent(); | 
| 163   void ExitFullscreen(); | 164   void ExitFullscreen(); | 
| 164   void ExitVrDueToUnsupportedMode(); | 165   void ExitVrDueToUnsupportedMode(UiUnsupportedMode mode); | 
| 165 | 166 | 
| 166   void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); | 167   void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); | 
| 167   void SubmitControllerModel(std::unique_ptr<VrControllerModel> model); | 168   void SubmitControllerModel(std::unique_ptr<VrControllerModel> model); | 
| 168 | 169 | 
| 169   // device::GvrGamepadDataProvider implementation. | 170   // device::GvrGamepadDataProvider implementation. | 
| 170   void UpdateGamepadData(device::GvrGamepadData) override; | 171   void UpdateGamepadData(device::GvrGamepadData) override; | 
| 171   void RegisterGvrGamepadDataFetcher(device::GvrGamepadDataFetcher*) override; | 172   void RegisterGvrGamepadDataFetcher(device::GvrGamepadDataFetcher*) override; | 
| 172 | 173 | 
| 173   // device::CardboardGamepadDataProvider implementation. | 174   // device::CardboardGamepadDataProvider implementation. | 
| 174   void RegisterCardboardGamepadDataFetcher( | 175   void RegisterCardboardGamepadDataFetcher( | 
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 257   base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 258   base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 
| 258 | 259 | 
| 259   DISALLOW_COPY_AND_ASSIGN(VrShell); | 260   DISALLOW_COPY_AND_ASSIGN(VrShell); | 
| 260 }; | 261 }; | 
| 261 | 262 | 
| 262 bool RegisterVrShell(JNIEnv* env); | 263 bool RegisterVrShell(JNIEnv* env); | 
| 263 | 264 | 
| 264 }  // namespace vr_shell | 265 }  // namespace vr_shell | 
| 265 | 266 | 
| 266 #endif  // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 267 #endif  // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 
| OLD | NEW | 
|---|