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

Side by Side Diff: chrome/browser/android/vr_shell/ui_element.cc

Issue 2829653003: PROTOTYPE (incomplete): Add quad renderer and stub bits to handle security warnings. (Closed)
Patch Set: Created 3 years, 8 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 #include "chrome/browser/android/vr_shell/ui_element.h" 5 #include "chrome/browser/android/vr_shell/ui_element.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const gfx::Vector3dF& ray_vector, 98 const gfx::Vector3dF& ray_vector,
99 float* distance) const { 99 float* distance) const {
100 return GetRayPlaneDistance(ray_origin, ray_vector, GetCenter(), GetNormal(), 100 return GetRayPlaneDistance(ray_origin, ray_vector, GetCenter(), GetNormal(),
101 distance); 101 distance);
102 } 102 }
103 103
104 UiElement::UiElement() = default; 104 UiElement::UiElement() = default;
105 105
106 UiElement::~UiElement() = default; 106 UiElement::~UiElement() = default;
107 107
108 bool UiElement::Render(VrShellRenderer* renderer) const {
109 return false;
110 }
111
108 void UiElement::Animate(const base::TimeTicks& time) { 112 void UiElement::Animate(const base::TimeTicks& time) {
109 for (auto& it : animations) { 113 for (auto& it : animations) {
110 Animation& animation = *it; 114 Animation& animation = *it;
111 if (time < animation.start) 115 if (time < animation.start)
112 continue; 116 continue;
113 117
114 // If |from| is not specified, start at the current values. 118 // If |from| is not specified, start at the current values.
115 if (animation.from.size() == 0) { 119 if (animation.from.size() == 0) {
116 switch (animation.property) { 120 switch (animation.property) {
117 case Animation::SIZE: 121 case Animation::SIZE:
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 197
194 bool UiElement::IsVisible() const { 198 bool UiElement::IsVisible() const {
195 return visible && computed_opacity > 0.0f; 199 return visible && computed_opacity > 0.0f;
196 } 200 }
197 201
198 bool UiElement::IsHitTestable() const { 202 bool UiElement::IsHitTestable() const {
199 return IsVisible() && hit_testable; 203 return IsVisible() && hit_testable;
200 } 204 }
201 205
202 } // namespace vr_shell 206 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698