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

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

Issue 2442873002: Control the VrShell content quad via the HTML UI. (Closed)
Patch Set: Rebase; address nits and bug. Created 4 years, 1 month 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
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // arbitrary, but must match the unit used in animations. 59 // arbitrary, but must match the unit used in animations.
60 void UpdateTransforms(float screen_tilt, int64_t time_in_micro); 60 void UpdateTransforms(float screen_tilt, int64_t time_in_micro);
61 61
62 // Handle a batch of commands passed from the UI HTML. 62 // Handle a batch of commands passed from the UI HTML.
63 void HandleCommands(const base::ListValue* commands, int64_t time_in_micro); 63 void HandleCommands(const base::ListValue* commands, int64_t time_in_micro);
64 64
65 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const; 65 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const;
66 66
67 ContentRectangle* GetUiElementById(int element_id); 67 ContentRectangle* GetUiElementById(int element_id);
68 68
69 ContentRectangle* GetContentQuad();
70
69 // Return a monotonic time in microseconds for coordinating animations. 71 // Return a monotonic time in microseconds for coordinating animations.
70 static int64_t TimeInMicroseconds(); 72 static int64_t TimeInMicroseconds();
71 73
72 private: 74 private:
73 void ApplyRecursiveTransforms(const ContentRectangle& element, 75 void ApplyRecursiveTransforms(const ContentRectangle& element,
74 ReversibleTransform* transform); 76 ReversibleTransform* transform);
75 void ApplyDictToElement(const base::DictionaryValue& dict, 77 void ApplyDictToElement(const base::DictionaryValue& dict,
76 ContentRectangle *element); 78 ContentRectangle *element);
79
77 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; 80 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_;
81 ContentRectangle* content_element_ = nullptr;
78 82
79 DISALLOW_COPY_AND_ASSIGN(UiScene); 83 DISALLOW_COPY_AND_ASSIGN(UiScene);
80 }; 84 };
81 85
82 } // namespace vr_shell 86 } // namespace vr_shell
83 87
84 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 88 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements.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