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

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene_manager.cc

Issue 2828873005: Fix content quad size and translation (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui_scene_manager.h" 5 #include "chrome/browser/android/vr_shell/ui_scene_manager.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/android/vr_shell/ui_element.h" 8 #include "chrome/browser/android/vr_shell/ui_element.h"
9 #include "chrome/browser/android/vr_shell/ui_scene.h" 9 #include "chrome/browser/android/vr_shell/ui_scene.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 element->hit_testable = false; 61 element->hit_testable = false;
62 element->lock_to_fov = true; 62 element->lock_to_fov = true;
63 transient_security_warning_ = element.get(); 63 transient_security_warning_ = element.get();
64 scene_->AddUiElement(std::move(element)); 64 scene_->AddUiElement(std::move(element));
65 65
66 // Main web content quad. 66 // Main web content quad.
67 element = base::MakeUnique<UiElement>(); 67 element = base::MakeUnique<UiElement>();
68 element->id = id++; 68 element->id = id++;
69 element->name = "Content"; 69 element->name = "Content";
70 element->fill = vr_shell::Fill::CONTENT; 70 element->fill = vr_shell::Fill::CONTENT;
71 element->size = {(1.6f * (16 / 9)), 1.6f, 1}; 71 element->size = {2.4f, 1.6f, 1};
mthiesse 2017/04/20 17:21:37 nit: Make constants, or otherwise show your work f
72 element->translation = {0, 0, -2}; 72 element->translation = {0, -0.1f, -2.5f};
73 element->visible = false; 73 element->visible = false;
74 main_content_ = element.get(); 74 main_content_ = element.get();
75 scene_->AddUiElement(std::move(element)); 75 scene_->AddUiElement(std::move(element));
76 } 76 }
77 77
78 UiSceneManager::~UiSceneManager() {} 78 UiSceneManager::~UiSceneManager() {}
79 79
80 base::WeakPtr<UiSceneManager> UiSceneManager::GetWeakPtr() { 80 base::WeakPtr<UiSceneManager> UiSceneManager::GetWeakPtr() {
81 return weak_ptr_factory_.GetWeakPtr(); 81 return weak_ptr_factory_.GetWeakPtr();
82 } 82 }
(...skipping 20 matching lines...) Expand all
103 } else { 103 } else {
104 security_warning_timer_.Stop(); 104 security_warning_timer_.Stop();
105 } 105 }
106 } 106 }
107 107
108 void UiSceneManager::OnSecurityWarningTimer() { 108 void UiSceneManager::OnSecurityWarningTimer() {
109 transient_security_warning_->visible = false; 109 transient_security_warning_->visible = false;
110 } 110 }
111 111
112 } // namespace vr_shell 112 } // namespace vr_shell
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698