| OLD | NEW |
| (Empty) | |
| 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 |
| 5 #include "chrome/browser/android/vr_shell/ui_elements/url_bar.h" |
| 6 |
| 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/android/vr_shell/textures/url_bar_texture.h" |
| 9 |
| 10 namespace vr_shell { |
| 11 |
| 12 UrlBar::UrlBar(int preferred_width) |
| 13 : TexturedElement(preferred_width), |
| 14 texture_(base::MakeUnique<UrlBarTexture>()) {} |
| 15 |
| 16 UrlBar::~UrlBar() = default; |
| 17 |
| 18 void UrlBar::OnHoverEnter() { |
| 19 texture_->SetHover(true); |
| 20 Update(); |
| 21 } |
| 22 |
| 23 void UrlBar::OnHoverLeave() { |
| 24 texture_->SetHover(false); |
| 25 Update(); |
| 26 } |
| 27 |
| 28 UiTexture* UrlBar::GetTexture() const { |
| 29 return texture_.get(); |
| 30 } |
| 31 |
| 32 void UrlBar::SetURL(const GURL& gurl) { |
| 33 texture_->SetURL(gurl); |
| 34 } |
| 35 |
| 36 } // namespace vr_shell |
| OLD | NEW |