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

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

Issue 2884453002: VR: audio and video capture indicators. (Closed)
Patch Set: rebase 2 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_scene_manager.h ('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 378aa7d88f7bf93e62a1544e88b9b1d9df6426af..07473440f51ecc6e0dcce1ea41d85527d5de9985 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -7,12 +7,14 @@
#include "base/callback.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/android/vr_shell/textures/ui_texture.h"
+#include "chrome/browser/android/vr_shell/ui_elements/audio_capture_indicator.h"
#include "chrome/browser/android/vr_shell/ui_elements/close_button.h"
#include "chrome/browser/android/vr_shell/ui_elements/loading_indicator.h"
#include "chrome/browser/android/vr_shell/ui_elements/permanent_security_warning.h"
#include "chrome/browser/android/vr_shell/ui_elements/transient_security_warning.h"
#include "chrome/browser/android/vr_shell/ui_elements/ui_element.h"
#include "chrome/browser/android/vr_shell/ui_elements/url_bar.h"
+#include "chrome/browser/android/vr_shell/ui_elements/video_capture_indicator.h"
#include "chrome/browser/android/vr_shell/ui_scene.h"
#include "chrome/browser/android/vr_shell/vr_browser_interface.h"
#include "chrome/browser/android/vr_shell/vr_shell.h"
@@ -65,6 +67,7 @@ UiSceneManager::UiSceneManager(VrBrowserInterface* browser,
CreateBackground();
CreateContentQuad();
CreateSecurityWarnings();
+ CreateSystemIndicators();
CreateUrlBar();
if (in_cct_)
CreateCloseButton();
@@ -107,6 +110,28 @@ void UiSceneManager::CreateSecurityWarnings() {
scene_->AddUiElement(std::move(element));
}
+void UiSceneManager::CreateSystemIndicators() {
+ std::unique_ptr<UiElement> element;
+
+ // TODO(acondor): Make constants for sizes and positions once the UX for the
+ // indicators is defined.
+ element = base::MakeUnique<AudioCaptureIndicator>(256);
+ element->set_id(AllocateId());
+ element->set_translation({-0.3, 0.8, -1.9});
+ element->set_size({0.4, 0, 1});
+ element->set_visible(false);
+ audio_input_indicator_ = element.get();
+ scene_->AddUiElement(std::move(element));
+
+ element = base::MakeUnique<VideoCaptureIndicator>(256);
+ element->set_id(AllocateId());
+ element->set_translation({0.3, 0.8, -1.9});
+ element->set_size({0.4, 0, 1});
+ element->set_visible(false);
+ video_input_indicator_ = element.get();
+ scene_->AddUiElement(std::move(element));
+}
+
void UiSceneManager::CreateContentQuad() {
std::unique_ptr<UiElement> element;
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698