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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/ui_element.h

Issue 2877133002: VR: Add a loading indicator to the scene. (Closed)
Patch Set: Rebase onto render text change. 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_ELEMENTS_UI_ELEMENT_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return inheritable_transform_; 216 return inheritable_transform_;
217 } 217 }
218 void set_inheritable_transform(const Transform& transform) { 218 void set_inheritable_transform(const Transform& transform) {
219 inheritable_transform_ = transform; 219 inheritable_transform_ = transform;
220 } 220 }
221 221
222 // A flag usable during transformation calculates to avoid duplicate work. 222 // A flag usable during transformation calculates to avoid duplicate work.
223 bool dirty() const { return dirty_; } 223 bool dirty() const { return dirty_; }
224 void set_dirty(bool dirty) { dirty_ = dirty; } 224 void set_dirty(bool dirty) { dirty_ = dirty; }
225 225
226 // By default, sets an element to be visible or not. This may be overridden to
227 // allow finer control of element visibility.
228 virtual void SetEnabled(bool enabled);
229
226 private: 230 private:
227 // Valid IDs are non-negative. 231 // Valid IDs are non-negative.
228 int id_ = -1; 232 int id_ = -1;
229 233
230 // If a non-negative parent ID is specified, applicable transformations 234 // If a non-negative parent ID is specified, applicable transformations
231 // are applied relative to the parent, rather than absolutely. 235 // are applied relative to the parent, rather than absolutely.
232 int parent_id_ = -1; 236 int parent_id_ = -1;
233 237
234 // If true, this object will be visible. 238 // If true, this object will be visible.
235 bool visible_ = true; 239 bool visible_ = true;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool dirty_ = false; 292 bool dirty_ = false;
289 293
290 Transform transform_; 294 Transform transform_;
291 295
292 DISALLOW_COPY_AND_ASSIGN(UiElement); 296 DISALLOW_COPY_AND_ASSIGN(UiElement);
293 }; 297 };
294 298
295 } // namespace vr_shell 299 } // namespace vr_shell
296 300
297 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ 301 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698