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

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

Issue 2905013002: [vr] Introduce ColorScheme (Closed)
Patch Set: rebase Created 3 years, 7 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_MANAGER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/android/vr_shell/ui_interface.h" 12 #include "chrome/browser/android/vr_shell/ui_interface.h"
13 #include "device/vr/vr_types.h" 13 #include "device/vr/vr_types.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace vr_shell { 17 namespace vr_shell {
18 18
19 class LoadingIndicator; 19 class LoadingIndicator;
20 class UiElement; 20 class UiElement;
21 class UiScene; 21 class UiScene;
22 class UrlBar; 22 class UrlBar;
23 class VrBrowserInterface; 23 class VrBrowserInterface;
24 24
25 struct ColorScheme;
26
25 class UiSceneManager { 27 class UiSceneManager {
26 public: 28 public:
27 UiSceneManager(VrBrowserInterface* browser, 29 UiSceneManager(VrBrowserInterface* browser,
28 UiScene* scene, 30 UiScene* scene,
29 bool in_cct, 31 bool in_cct,
30 bool in_web_vr); 32 bool in_web_vr);
31 ~UiSceneManager(); 33 ~UiSceneManager();
32 34
33 base::WeakPtr<UiSceneManager> GetWeakPtr(); 35 base::WeakPtr<UiSceneManager> GetWeakPtr();
34 36
35 void SetFullscreen(bool fullscreen); 37 void SetFullscreen(bool fullscreen);
36 void SetURL(const GURL& gurl); 38 void SetURL(const GURL& gurl);
37 void SetWebVrSecureOrigin(bool secure); 39 void SetWebVrSecureOrigin(bool secure);
38 void SetWebVrMode(bool web_vr); 40 void SetWebVrMode(bool web_vr);
39 void SetSecurityLevel(int level); 41 void SetSecurityLevel(int level);
40 void SetLoading(bool loading); 42 void SetLoading(bool loading);
41 void SetLoadProgress(float progress); 43 void SetLoadProgress(float progress);
42 void SetIsExiting(); 44 void SetIsExiting();
43 // These methods are currently stubbed.
44 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward);
45 void SetVideoCapturingIndicator(bool enabled); 45 void SetVideoCapturingIndicator(bool enabled);
46 void SetScreenCapturingIndicator(bool enabled); 46 void SetScreenCapturingIndicator(bool enabled);
47 void SetAudioCapturingIndicator(bool enabled); 47 void SetAudioCapturingIndicator(bool enabled);
48 48
49 // These methods are currently stubbed.
50 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward);
51
49 void OnAppButtonClicked(); 52 void OnAppButtonClicked();
50 void OnAppButtonGesturePerformed(UiInterface::Direction direction); 53 void OnAppButtonGesturePerformed(UiInterface::Direction direction);
51 54
52 private: 55 private:
53 void CreateScreenDimmer(); 56 void CreateScreenDimmer();
54 void CreateSecurityWarnings(); 57 void CreateSecurityWarnings();
55 void CreateSystemIndicators(); 58 void CreateSystemIndicators();
56 void CreateContentQuad(); 59 void CreateContentQuad();
57 void CreateBackground(); 60 void CreateBackground();
58 void CreateUrlBar(); 61 void CreateUrlBar();
59 void CreateCloseButton(); 62 void CreateCloseButton();
60 void CreateExitWarning(); 63 void CreateExitWarning();
61 64
62 void ConfigureScene(); 65 void ConfigureScene();
63 void ConfigureBackgroundColor(vr::Colorf center_color,
64 vr::Colorf horizon_color);
65 void ConfigureSecurityWarnings(); 66 void ConfigureSecurityWarnings();
67 void UpdateBackgroundColor();
66 void OnSecurityWarningTimer(); 68 void OnSecurityWarningTimer();
67 void OnBackButtonClicked(); 69 void OnBackButtonClicked();
68 void OnCloseButtonClicked(); 70 void OnCloseButtonClicked();
69 int AllocateId(); 71 int AllocateId();
72 const ColorScheme& color_scheme() const;
70 73
71 VrBrowserInterface* browser_; 74 VrBrowserInterface* browser_;
72 UiScene* scene_; 75 UiScene* scene_;
73 76
74 // UI element pointers (not owned by the scene manager). 77 // UI element pointers (not owned by the scene manager).
75 UiElement* permanent_security_warning_ = nullptr; 78 UiElement* permanent_security_warning_ = nullptr;
76 UiElement* transient_security_warning_ = nullptr; 79 UiElement* transient_security_warning_ = nullptr;
77 UiElement* exit_warning_ = nullptr; 80 UiElement* exit_warning_ = nullptr;
78 UiElement* main_content_ = nullptr; 81 UiElement* main_content_ = nullptr;
79 UiElement* audio_capture_indicator_ = nullptr; 82 UiElement* audio_capture_indicator_ = nullptr;
(...skipping 20 matching lines...) Expand all
100 base::OneShotTimer security_warning_timer_; 103 base::OneShotTimer security_warning_timer_;
101 104
102 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; 105 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_;
103 106
104 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); 107 DISALLOW_COPY_AND_ASSIGN(UiSceneManager);
105 }; 108 };
106 109
107 } // namespace vr_shell 110 } // namespace vr_shell
108 111
109 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 112 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/color_scheme.cc ('k') | chrome/browser/android/vr_shell/ui_scene_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698