| OLD | NEW |
| 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 Loading... |
| 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}; |
| 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 Loading... |
| 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 |
| OLD | NEW |