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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2775283004: Rendering Daydream controller in a fixed position. (Closed)
Patch Set: Moving code to more appropriate locations. Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
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/vr_controller_model.h"
18 #include "content/public/browser/web_contents_observer.h" 19 #include "content/public/browser/web_contents_observer.h"
19 #include "device/vr/android/gvr/gvr_delegate.h" 20 #include "device/vr/android/gvr/gvr_delegate.h"
20 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h" 21 #include "device/vr/android/gvr/gvr_gamepad_data_provider.h"
21 #include "device/vr/vr_service.mojom.h" 22 #include "device/vr/vr_service.mojom.h"
22 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h" 23 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h"
23 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h" 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h"
24 25
25 namespace base { 26 namespace base {
26 class ListValue; 27 class ListValue;
27 } 28 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 171
171 void SetContentCssSize(float width, float height, float dpr); 172 void SetContentCssSize(float width, float height, float dpr);
172 void SetUiCssSize(float width, float height, float dpr); 173 void SetUiCssSize(float width, float height, float dpr);
173 174
174 void ContentFrameWasResized(bool width_changed); 175 void ContentFrameWasResized(bool width_changed);
175 176
176 void ForceExitVr(); 177 void ForceExitVr();
177 178
178 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); 179 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event);
179 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); 180 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event);
181 void SubmitControllerModel(std::unique_ptr<VrControllerModel> model);
180 182
181 // device::GvrGamepadDataProvider implementation. 183 // device::GvrGamepadDataProvider implementation.
182 void UpdateGamepadData(device::GvrGamepadData) override; 184 void UpdateGamepadData(device::GvrGamepadData) override;
183 void RegisterGamepadDataFetcher(device::GvrGamepadDataFetcher*) override; 185 void RegisterGamepadDataFetcher(device::GvrGamepadDataFetcher*) override;
184 186
185 // TODO(mthiesse): Find a better place for these functions to live. 187 // TODO(mthiesse): Find a better place for these functions to live.
186 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat); 188 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
187 static gvr::Sizei GetRecommendedWebVrSize(gvr::GvrApi* gvr_api); 189 static gvr::Sizei GetRecommendedWebVrSize(gvr::GvrApi* gvr_api);
188 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo( 190 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
189 gvr::GvrApi* gvr_api, 191 gvr::GvrApi* gvr_api,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 266 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
265 267
266 DISALLOW_COPY_AND_ASSIGN(VrShell); 268 DISALLOW_COPY_AND_ASSIGN(VrShell);
267 }; 269 };
268 270
269 bool RegisterVrShell(JNIEnv* env); 271 bool RegisterVrShell(JNIEnv* env);
270 272
271 } // namespace vr_shell 273 } // namespace vr_shell
272 274
273 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 275 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_controller_model.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698