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

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2885433003: VR: Implement Omnibox input targeting. (Closed)
Patch Set: rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/url_bar.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene_manager.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc
index 07473440f51ecc6e0dcce1ea41d85527d5de9985..430e8e1274e97cf54d17b64dade843af747937dd 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -31,13 +31,23 @@ static constexpr float kPermanentWarningWidth = 0.224f;
static constexpr float kTransientWarningHeight = 0.160;
static constexpr float kTransientWarningWidth = 0.512;
-static constexpr float kContentWidth = 2.4;
-static constexpr float kContentHeight = 1.6;
static constexpr float kContentDistance = 2.5;
-static constexpr float kContentVerticalOffset = -0.26;
+static constexpr float kContentWidth = 0.96 * kContentDistance;
+static constexpr float kContentHeight = 0.64 * kContentDistance;
+static constexpr float kContentVerticalOffset = -0.1 * kContentDistance;
static constexpr float kBackplaneSize = 1000.0;
static constexpr float kBackgroundDistanceMultiplier = 1.414;
+static constexpr float kUrlBarDistance = 2.4;
+static constexpr float kUrlBarWidth = 0.672 * kUrlBarDistance;
+static constexpr float kUrlBarHeight = 0.088 * kUrlBarDistance;
+static constexpr float kUrlBarVerticalOffset = -0.516 * kUrlBarDistance;
+
+static constexpr float kLoadingIndicatorWidth = 0.24 * kUrlBarDistance;
+static constexpr float kLoadingIndicatorHeight = 0.008 * kUrlBarDistance;
+static constexpr float kLoadingIndicatorOffset =
+ -0.016 * kUrlBarDistance - kLoadingIndicatorHeight / 2;
+
static constexpr float kFullscreenWidth = 2.88;
static constexpr float kFullscreenHeight = 1.62;
static constexpr float kFullscreenDistance = 3;
@@ -215,8 +225,8 @@ void UiSceneManager::CreateUrlBar() {
// TODO(cjgrant): Incorporate final size and position.
auto url_bar = base::MakeUnique<UrlBar>(512);
url_bar->set_id(AllocateId());
- url_bar->set_translation({0, -0.9, -1.8});
- url_bar->set_size({0.9, 0, 1});
+ url_bar->set_translation({0, kUrlBarVerticalOffset, -kUrlBarDistance});
+ url_bar->set_size({kUrlBarWidth, kUrlBarHeight, 1});
url_bar->SetBackButtonCallback(
base::Bind(&UiSceneManager::OnBackButtonClicked, base::Unretained(this)));
url_bar_ = url_bar.get();
@@ -225,8 +235,10 @@ void UiSceneManager::CreateUrlBar() {
auto indicator = base::MakeUnique<LoadingIndicator>(256);
indicator->set_id(AllocateId());
- indicator->set_translation({0, -0.8, -1.8});
- indicator->set_size({0.4, 0, 1});
+ indicator->set_translation({0, 0, kLoadingIndicatorOffset});
+ indicator->set_size({kLoadingIndicatorWidth, kLoadingIndicatorHeight, 1});
+ indicator->set_parent_id(url_bar_->id());
+ indicator->set_y_anchoring(YAnchoring::YTOP);
loading_indicator_ = indicator.get();
control_elements_.push_back(indicator.get());
scene_->AddUiElement(std::move(indicator));
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/url_bar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698