Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/ui_element.cc

Issue 2903363002: VR: Split off UI code into a library to ease future unit testing. (Closed)
Patch Set: More tweaks. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const gfx::Vector3dF& ray_vector, 102 const gfx::Vector3dF& ray_vector,
103 float* distance) const { 103 float* distance) const {
104 return GetRayPlaneDistance(ray_origin, ray_vector, GetCenter(), GetNormal(), 104 return GetRayPlaneDistance(ray_origin, ray_vector, GetCenter(), GetNormal(),
105 distance); 105 distance);
106 } 106 }
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(UiElementRenderer* 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() {} 117 void UiElement::Initialize() {}
118 118
119 void UiElement::OnHoverEnter(const gfx::PointF& position) {} 119 void UiElement::OnHoverEnter(const gfx::PointF& position) {}
120 120
121 void UiElement::OnHoverLeave() {} 121 void UiElement::OnHoverLeave() {}
122 122
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void UiElement::SetMode(ColorScheme::Mode mode) { 234 void UiElement::SetMode(ColorScheme::Mode mode) {
235 if (mode_ == mode) 235 if (mode_ == mode)
236 return; 236 return;
237 mode_ = mode; 237 mode_ = mode;
238 OnSetMode(); 238 OnSetMode();
239 } 239 }
240 240
241 void UiElement::OnSetMode() {} 241 void UiElement::OnSetMode() {}
242 242
243 } // namespace vr_shell 243 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/ui_element.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698