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

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

Issue 2902043005: [vr] Add incognito coloring (Closed)
Patch Set: . Created 3 years, 6 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 "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/android/vr_shell/color_scheme.h"
13 #include "chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h" 14 #include "chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h"
14 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
15 16
16 namespace base { 17 namespace base {
17 class ListValue; 18 class ListValue;
18 class TimeTicks; 19 class TimeTicks;
19 } 20 }
20 21
21 namespace vr_shell { 22 namespace vr_shell {
22 23
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const std::vector<std::unique_ptr<UiElement>>& GetUiElements() const; 60 const std::vector<std::unique_ptr<UiElement>>& GetUiElements() const;
60 61
61 UiElement* GetUiElementById(int element_id) const; 62 UiElement* GetUiElementById(int element_id) const;
62 UiElement* GetUiElementByDebugId(UiElementDebugId debug_id) const; 63 UiElement* GetUiElementByDebugId(UiElementDebugId debug_id) const;
63 64
64 std::vector<const UiElement*> GetWorldElements() const; 65 std::vector<const UiElement*> GetWorldElements() const;
65 std::vector<const UiElement*> GetOverlayElements() const; 66 std::vector<const UiElement*> GetOverlayElements() const;
66 std::vector<const UiElement*> GetHeadLockedElements() const; 67 std::vector<const UiElement*> GetHeadLockedElements() const;
67 bool HasVisibleHeadLockedElements() const; 68 bool HasVisibleHeadLockedElements() const;
68 69
69 void SetBackgroundColor(const SkColor& color); 70 void SetMode(ColorScheme::Mode mode);
70 const SkColor& GetBackgroundColor() const; 71 ColorScheme::Mode mode() const;
72
73 SkColor GetBackgroundColor() const;
74
71 void SetBackgroundDistance(float distance); 75 void SetBackgroundDistance(float distance);
72 float GetBackgroundDistance() const; 76 float GetBackgroundDistance() const;
73 77
74 bool GetWebVrRenderingEnabled() const; 78 bool GetWebVrRenderingEnabled() const;
75 void SetWebVrRenderingEnabled(bool enabled); 79 void SetWebVrRenderingEnabled(bool enabled);
76 80
77 bool is_exiting() const { return is_exiting_; } 81 bool is_exiting() const { return is_exiting_; }
78 void set_is_exiting(); 82 void set_is_exiting();
79 83
80 void OnGLInitialized(); 84 void OnGLInitialized();
81 85
82 private: 86 private:
83 void Animate(const base::TimeTicks& current_time); 87 void Animate(const base::TimeTicks& current_time);
84 void ApplyRecursiveTransforms(UiElement* element); 88 void ApplyRecursiveTransforms(UiElement* element);
85 89
86 std::vector<std::unique_ptr<UiElement>> ui_elements_; 90 std::vector<std::unique_ptr<UiElement>> ui_elements_;
87 UiElement* content_element_ = nullptr; 91 UiElement* content_element_ = nullptr;
88 SkColor background_color_ = 0xFF1A1A1A; 92 ColorScheme::Mode mode_ = ColorScheme::kModeNormal;
93
89 float background_distance_ = 10.0f; 94 float background_distance_ = 10.0f;
90 bool webvr_rendering_enabled_ = true; 95 bool webvr_rendering_enabled_ = true;
91 bool gl_initialized_ = false; 96 bool gl_initialized_ = false;
92 bool is_exiting_ = false; 97 bool is_exiting_ = false;
93 98
94 DISALLOW_COPY_AND_ASSIGN(UiScene); 99 DISALLOW_COPY_AND_ASSIGN(UiScene);
95 }; 100 };
96 101
97 } // namespace vr_shell 102 } // namespace vr_shell
98 103
99 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 104 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_interface.h ('k') | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698