vollick | d08fbfd | 2017-05-17 19:30:10 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
Ian Vollick | 4e26ac32 | 2017-07-11 14:58:21 | [diff] [blame] | 5 | #include "chrome/browser/vr/elements/button_texture.h" |
vollick | d08fbfd | 2017-05-17 19:30:10 | [diff] [blame] | 6 | |
Ian Vollick | 4e26ac32 | 2017-07-11 14:58:21 | [diff] [blame] | 7 | namespace vr { |
vollick | d08fbfd | 2017-05-17 19:30:10 | [diff] [blame] | 8 | |
| 9 | ButtonTexture::ButtonTexture() = default; |
| 10 | |
| 11 | ButtonTexture::~ButtonTexture() = default; |
| 12 | |
amp | f9189aa | 2017-06-06 21:33:07 | [diff] [blame] | 13 | void ButtonTexture::OnSetMode() { |
| 14 | set_dirty(); |
| 15 | } |
| 16 | |
vollick | d08fbfd | 2017-05-17 19:30:10 | [diff] [blame] | 17 | void ButtonTexture::SetPressed(bool pressed) { |
| 18 | if (pressed_ != pressed) |
| 19 | set_dirty(); |
| 20 | pressed_ = pressed; |
| 21 | } |
| 22 | |
| 23 | void ButtonTexture::SetHovered(bool hovered) { |
| 24 | if (hovered_ != hovered) |
| 25 | set_dirty(); |
| 26 | hovered_ = hovered; |
| 27 | } |
| 28 | |
Ian Vollick | 4e26ac32 | 2017-07-11 14:58:21 | [diff] [blame] | 29 | } // namespace vr |