| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/textures/button_texture.h" | 5 #include "chrome/browser/android/vr_shell/textures/button_texture.h" |
| 6 | 6 |
| 7 namespace vr_shell { | 7 namespace vr_shell { |
| 8 | 8 |
| 9 ButtonTexture::ButtonTexture() = default; | 9 ButtonTexture::ButtonTexture() = default; |
| 10 | 10 |
| 11 ButtonTexture::~ButtonTexture() = default; | 11 ButtonTexture::~ButtonTexture() = default; |
| 12 | 12 |
| 13 void ButtonTexture::OnSetMode() { |
| 14 set_dirty(); |
| 15 } |
| 16 |
| 13 void ButtonTexture::SetPressed(bool pressed) { | 17 void ButtonTexture::SetPressed(bool pressed) { |
| 14 if (pressed_ != pressed) | 18 if (pressed_ != pressed) |
| 15 set_dirty(); | 19 set_dirty(); |
| 16 pressed_ = pressed; | 20 pressed_ = pressed; |
| 17 } | 21 } |
| 18 | 22 |
| 19 void ButtonTexture::SetHovered(bool hovered) { | 23 void ButtonTexture::SetHovered(bool hovered) { |
| 20 if (hovered_ != hovered) | 24 if (hovered_ != hovered) |
| 21 set_dirty(); | 25 set_dirty(); |
| 22 hovered_ = hovered; | 26 hovered_ = hovered; |
| 23 } | 27 } |
| 24 | 28 |
| 25 } // namespace vr_shell | 29 } // namespace vr_shell |
| OLD | NEW |