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

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

Issue 2814443004: Refactor VR math off of GVR types, onto gfx types where possible. (Closed)
Patch Set: Fix tests 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_UI_SCENE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/android/vr_shell/vr_math.h" 12 #include "device/vr/vr_types.h"
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue; 15 class DictionaryValue;
16 class ListValue; 16 class ListValue;
17 class TimeTicks; 17 class TimeTicks;
18 } 18 }
19 19
20 namespace vr_shell { 20 namespace vr_shell {
21 21
22 class Animation; 22 class Animation;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const base::TimeTicks& current_time); 66 const base::TimeTicks& current_time);
67 67
68 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const; 68 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const;
69 69
70 ContentRectangle* GetUiElementById(int element_id); 70 ContentRectangle* GetUiElementById(int element_id);
71 71
72 std::vector<const ContentRectangle*> GetWorldElements() const; 72 std::vector<const ContentRectangle*> GetWorldElements() const;
73 std::vector<const ContentRectangle*> GetHeadLockedElements() const; 73 std::vector<const ContentRectangle*> GetHeadLockedElements() const;
74 bool HasVisibleHeadLockedElements() const; 74 bool HasVisibleHeadLockedElements() const;
75 75
76 const Colorf& GetBackgroundColor() const; 76 const vr::Colorf& GetBackgroundColor() const;
77 float GetBackgroundDistance() const; 77 float GetBackgroundDistance() const;
78 bool GetWebVrRenderingEnabled() const; 78 bool GetWebVrRenderingEnabled() const;
79 79
80 private: 80 private:
81 void ApplyRecursiveTransforms(ContentRectangle* element); 81 void ApplyRecursiveTransforms(ContentRectangle* element);
82 void ApplyDictToElement(const base::DictionaryValue& dict, 82 void ApplyDictToElement(const base::DictionaryValue& dict,
83 ContentRectangle* element); 83 ContentRectangle* element);
84 84
85 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; 85 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_;
86 ContentRectangle* content_element_ = nullptr; 86 ContentRectangle* content_element_ = nullptr;
87 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; 87 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f};
88 float background_distance_ = 10.0f; 88 float background_distance_ = 10.0f;
89 bool webvr_rendering_enabled_ = true; 89 bool webvr_rendering_enabled_ = true;
90 90
91 DISALLOW_COPY_AND_ASSIGN(UiScene); 91 DISALLOW_COPY_AND_ASSIGN(UiScene);
92 }; 92 };
93 93
94 } // namespace vr_shell 94 } // namespace vr_shell
95 95
96 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 96 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements_unittest.cc ('k') | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698