| OLD | NEW |
| 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_elements/ui_element.h" | 5 #include "chrome/browser/android/vr_shell/ui_elements/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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 UiElement::UiElement() = default; | 108 UiElement::UiElement() = default; |
| 109 | 109 |
| 110 UiElement::~UiElement() = default; | 110 UiElement::~UiElement() = default; |
| 111 | 111 |
| 112 void UiElement::Render(VrShellRenderer* renderer, | 112 void UiElement::Render(VrShellRenderer* renderer, |
| 113 vr::Mat4f view_proj_matrix) const { | 113 vr::Mat4f view_proj_matrix) const { |
| 114 NOTREACHED(); | 114 NOTREACHED(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void UiElement::Initialize(VrSurfaceProvider* provider) { |
| 118 surface_provider_ = provider; |
| 119 Initialize(); |
| 120 } |
| 121 |
| 117 void UiElement::Initialize() {} | 122 void UiElement::Initialize() {} |
| 118 | 123 |
| 119 void UiElement::OnHoverEnter() {} | 124 void UiElement::OnHoverEnter() {} |
| 120 | 125 |
| 121 void UiElement::OnHoverLeave() {} | 126 void UiElement::OnHoverLeave() {} |
| 122 | 127 |
| 123 void UiElement::OnButtonDown() {} | 128 void UiElement::OnButtonDown() {} |
| 124 | 129 |
| 125 void UiElement::OnButtonUp() {} | 130 void UiElement::OnButtonUp() {} |
| 126 | 131 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 217 |
| 213 bool UiElement::IsVisible() const { | 218 bool UiElement::IsVisible() const { |
| 214 return visible_ && computed_opacity_ > 0.0f; | 219 return visible_ && computed_opacity_ > 0.0f; |
| 215 } | 220 } |
| 216 | 221 |
| 217 bool UiElement::IsHitTestable() const { | 222 bool UiElement::IsHitTestable() const { |
| 218 return IsVisible() && hit_testable_; | 223 return IsVisible() && hit_testable_; |
| 219 } | 224 } |
| 220 | 225 |
| 221 } // namespace vr_shell | 226 } // namespace vr_shell |
| OLD | NEW |