| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 void UiElement::SetEnabled(bool enabled) { | 225 void UiElement::SetEnabled(bool enabled) { |
| 226 visible_ = enabled; | 226 visible_ = enabled; |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool UiElement::HitTest(const gfx::PointF& point) const { | 229 bool UiElement::HitTest(const gfx::PointF& point) const { |
| 230 return point.x() >= 0.0f && point.x() <= 1.0f && point.y() >= 0.0f && | 230 return point.x() >= 0.0f && point.x() <= 1.0f && point.y() >= 0.0f && |
| 231 point.y() <= 1.0f; | 231 point.y() <= 1.0f; |
| 232 } | 232 } |
| 233 | 233 |
| 234 void UiElement::SetMode(ColorScheme::Mode mode) { |
| 235 if (mode_ == mode) |
| 236 return; |
| 237 mode_ = mode; |
| 238 OnSetMode(); |
| 239 } |
| 240 |
| 241 void UiElement::OnSetMode() {} |
| 242 |
| 234 } // namespace vr_shell | 243 } // namespace vr_shell |
| OLD | NEW |