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

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

Issue 2913633002: [vr] Clicking on the security icon should prompt the user to bail out of VR (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_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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void OnAppButtonGesturePerformed(UiInterface::Direction direction); 52 void OnAppButtonGesturePerformed(UiInterface::Direction direction);
53 53
54 private: 54 private:
55 void CreateScreenDimmer(); 55 void CreateScreenDimmer();
56 void CreateSecurityWarnings(); 56 void CreateSecurityWarnings();
57 void CreateSystemIndicators(); 57 void CreateSystemIndicators();
58 void CreateContentQuad(); 58 void CreateContentQuad();
59 void CreateBackground(); 59 void CreateBackground();
60 void CreateUrlBar(); 60 void CreateUrlBar();
61 void CreateCloseButton(); 61 void CreateCloseButton();
62 void CreateExitWarning();
63 62
64 void ConfigureScene(); 63 void ConfigureScene();
65 void ConfigureSecurityWarnings(); 64 void ConfigureSecurityWarnings();
66 void UpdateBackgroundColor(); 65 void UpdateBackgroundColor();
67 void OnSecurityWarningTimer(); 66 void OnSecurityWarningTimer();
68 void OnBackButtonClicked(); 67 void OnBackButtonClicked();
68 void OnSecurityIconClicked();
69 void OnExitPromptPrimaryButtonClicked();
70 void OnExitPromptSecondaryButtonClicked();
69 void OnCloseButtonClicked(); 71 void OnCloseButtonClicked();
70 void OnUnsupportedMode(UiUnsupportedMode mode); 72 void OnUnsupportedMode(UiUnsupportedMode mode);
71 int AllocateId(); 73 int AllocateId();
72 ColorScheme::Mode mode() const; 74 ColorScheme::Mode mode() const;
73 const ColorScheme& color_scheme() const; 75 const ColorScheme& color_scheme() const;
74 76
75 VrBrowserInterface* browser_; 77 VrBrowserInterface* browser_;
76 UiScene* scene_; 78 UiScene* scene_;
77 79
78 // UI element pointers (not owned by the scene manager). 80 // UI element pointers (not owned by the scene manager).
79 UiElement* permanent_security_warning_ = nullptr; 81 UiElement* permanent_security_warning_ = nullptr;
80 UiElement* transient_security_warning_ = nullptr; 82 UiElement* transient_security_warning_ = nullptr;
83 UiElement* exit_prompt_ = nullptr;
81 UiElement* exit_warning_ = nullptr; 84 UiElement* exit_warning_ = nullptr;
82 UiElement* main_content_ = nullptr; 85 UiElement* main_content_ = nullptr;
86 UiElement* main_content_backplane_ = nullptr;
83 UiElement* audio_capture_indicator_ = nullptr; 87 UiElement* audio_capture_indicator_ = nullptr;
84 UiElement* video_capture_indicator_ = nullptr; 88 UiElement* video_capture_indicator_ = nullptr;
85 UiElement* screen_capture_indicator_ = nullptr; 89 UiElement* screen_capture_indicator_ = nullptr;
86 UiElement* screen_dimmer_ = nullptr; 90 UiElement* screen_dimmer_ = nullptr;
87 UiElement* ceiling_ = nullptr; 91 UiElement* ceiling_ = nullptr;
88 UiElement* floor_ = nullptr; 92 UiElement* floor_ = nullptr;
89 UrlBar* url_bar_ = nullptr; 93 UrlBar* url_bar_ = nullptr;
90 LoadingIndicator* loading_indicator_ = nullptr; 94 LoadingIndicator* loading_indicator_ = nullptr;
91 95
92 bool in_cct_; 96 bool in_cct_;
93 bool web_vr_mode_; 97 bool web_vr_mode_;
94 bool secure_origin_ = false; 98 bool secure_origin_ = false;
95 bool fullscreen_ = false; 99 bool fullscreen_ = false;
96 bool incognito_ = false; 100 bool incognito_ = false;
97 bool is_exiting_ = false;
98 bool audio_capturing_ = false; 101 bool audio_capturing_ = false;
99 bool video_capturing_ = false; 102 bool video_capturing_ = false;
100 bool screen_capturing_ = false; 103 bool screen_capturing_ = false;
101 104
102 int next_available_id_ = 1; 105 int next_available_id_ = 1;
103 106
104 std::vector<UiElement*> content_elements_; 107 std::vector<UiElement*> content_elements_;
108 std::vector<UiElement*> background_elements_;
105 std::vector<UiElement*> control_elements_; 109 std::vector<UiElement*> control_elements_;
106 110
107 base::OneShotTimer security_warning_timer_; 111 base::OneShotTimer security_warning_timer_;
108 112
109 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; 113 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_;
110 114
111 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); 115 DISALLOW_COPY_AND_ASSIGN(UiSceneManager);
112 }; 116 };
113 117
114 } // namespace vr_shell 118 } // namespace vr_shell
115 119
116 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 120 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698