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

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

Issue 2876403003: VR: text for audio/video input capture notifications (Closed)
Patch Set: removing unnecessary comments 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 unified diff | Download patch
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/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" 9 #include "chrome/browser/android/vr_shell/textures/ui_texture.h"
10 #include "chrome/browser/android/vr_shell/ui_elements/audio_capture_indicator.h" 10 #include "chrome/browser/android/vr_shell/ui_elements/audio_capture_indicator.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 element->set_lock_to_fov(true); 108 element->set_lock_to_fov(true);
109 transient_security_warning_ = element.get(); 109 transient_security_warning_ = element.get();
110 scene_->AddUiElement(std::move(element)); 110 scene_->AddUiElement(std::move(element));
111 } 111 }
112 112
113 void UiSceneManager::CreateSystemIndicators() { 113 void UiSceneManager::CreateSystemIndicators() {
114 std::unique_ptr<UiElement> element; 114 std::unique_ptr<UiElement> element;
115 115
116 // TODO(acondor): Make constants for sizes and positions once the UX for the 116 // TODO(acondor): Make constants for sizes and positions once the UX for the
117 // indicators is defined. 117 // indicators is defined.
118 element = base::MakeUnique<AudioCaptureIndicator>(256); 118 element = base::MakeUnique<AudioCaptureIndicator>(512);
119 element->set_id(AllocateId()); 119 element->set_id(AllocateId());
120 element->set_translation({-0.3, 0.8, -1.9}); 120 element->set_translation({-0.3, 0.8, -1.9});
121 element->set_size({0.4, 0, 1}); 121 element->set_size({0.5, 0, 1});
122 element->set_visible(false); 122 element->set_visible(false);
123 audio_input_indicator_ = element.get(); 123 audio_input_indicator_ = element.get();
124 scene_->AddUiElement(std::move(element)); 124 scene_->AddUiElement(std::move(element));
125 125
126 element = base::MakeUnique<VideoCaptureIndicator>(256); 126 element = base::MakeUnique<VideoCaptureIndicator>(512);
127 element->set_id(AllocateId()); 127 element->set_id(AllocateId());
128 element->set_translation({0.3, 0.8, -1.9}); 128 element->set_translation({0.3, 0.8, -1.9});
129 element->set_size({0.4, 0, 1}); 129 element->set_size({0.5, 0, 1});
130 element->set_visible(false); 130 element->set_visible(false);
131 video_input_indicator_ = element.get(); 131 video_input_indicator_ = element.get();
132 scene_->AddUiElement(std::move(element)); 132 scene_->AddUiElement(std::move(element));
133 } 133 }
134 134
135 void UiSceneManager::CreateContentQuad() { 135 void UiSceneManager::CreateContentQuad() {
136 std::unique_ptr<UiElement> element; 136 std::unique_ptr<UiElement> element;
137 137
138 element = base::MakeUnique<UiElement>(); 138 element = base::MakeUnique<UiElement>();
139 element->set_id(AllocateId()); 139 element->set_id(AllocateId());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back, 349 void UiSceneManager::SetHistoryButtonsEnabled(bool can_go_back,
350 bool can_go_forward) {} 350 bool can_go_forward) {}
351 351
352 void UiSceneManager::OnCloseButtonClicked() {} 352 void UiSceneManager::OnCloseButtonClicked() {}
353 353
354 int UiSceneManager::AllocateId() { 354 int UiSceneManager::AllocateId() {
355 return next_available_id_++; 355 return next_available_id_++;
356 } 356 }
357 357
358 } // namespace vr_shell 358 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698