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

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

Issue 2862283002: VR: Add initial URL bar element and texture. (Closed)
Patch Set: 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 "url/gurl.h"
12 13
13 namespace vr_shell { 14 namespace vr_shell {
14 15
15 class UiElement; 16 class UiElement;
16 class UiScene; 17 class UiScene;
18 class UrlBar;
17 class VrBrowserInterface; 19 class VrBrowserInterface;
18 20
19 class UiSceneManager { 21 class UiSceneManager {
20 public: 22 public:
21 UiSceneManager(VrBrowserInterface* browser, UiScene* scene); 23 UiSceneManager(VrBrowserInterface* browser, UiScene* scene);
22 ~UiSceneManager(); 24 ~UiSceneManager();
23 25
24 base::WeakPtr<UiSceneManager> GetWeakPtr(); 26 base::WeakPtr<UiSceneManager> GetWeakPtr();
25 27
26 void SetWebVRSecureOrigin(bool secure); 28 void SetWebVRSecureOrigin(bool secure);
27 void SetWebVRMode(bool web_vr); 29 void SetWebVRMode(bool web_vr);
28 30
29 void OnAppButtonClicked(); 31 void OnAppButtonClicked();
32 void OnUrlChange(const GURL& gurl);
30 33
31 private: 34 private:
32 void CreateSecurityWarnings(); 35 void CreateSecurityWarnings();
33 void CreateContentQuad(); 36 void CreateContentQuad();
34 void CreateBackground(); 37 void CreateBackground();
38 void CreateUrlBar();
35 39
36 void ConfigureSecurityWarnings(); 40 void ConfigureSecurityWarnings();
37 void OnSecurityWarningTimer(); 41 void OnSecurityWarningTimer();
38 int AllocateId(); 42 int AllocateId();
39 43
40 VrBrowserInterface* browser_; 44 VrBrowserInterface* browser_;
41 UiScene* scene_; 45 UiScene* scene_;
42 46
43 // UI element pointers (not owned by the scene manager). 47 // UI element pointers (not owned by the scene manager).
44 UiElement* permanent_security_warning_ = nullptr; 48 UiElement* permanent_security_warning_ = nullptr;
45 UiElement* transient_security_warning_ = nullptr; 49 UiElement* transient_security_warning_ = nullptr;
46 UiElement* main_content_ = nullptr; 50 UiElement* main_content_ = nullptr;
51 UrlBar* url_bar_ = nullptr;
47 52
48 bool web_vr_mode_ = false; 53 bool web_vr_mode_ = false;
49 bool secure_origin_ = false; 54 bool secure_origin_ = false;
50 bool content_rendering_enabled_ = true; 55 bool content_rendering_enabled_ = true;
51 56
52 int next_available_id_ = 1; 57 int next_available_id_ = 1;
53 58
54 std::vector<UiElement*> browser_ui_elements_; 59 std::vector<UiElement*> browser_ui_elements_;
55 60
56 base::OneShotTimer security_warning_timer_; 61 base::OneShotTimer security_warning_timer_;
57 62
58 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_; 63 base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_;
59 64
60 DISALLOW_COPY_AND_ASSIGN(UiSceneManager); 65 DISALLOW_COPY_AND_ASSIGN(UiSceneManager);
61 }; 66 };
62 67
63 } // namespace vr_shell 68 } // namespace vr_shell
64 69
65 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_ 70 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698