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

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

Issue 2884453002: VR: audio and video capture indicators. (Closed)
Patch Set: adding missing files 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 4dca2196c94b0a96e53fed98a21751b0c0a55b2a..173fe70a5ebea77f2e62693ddd7ad75ec083b99b 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -6,10 +6,12 @@
#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_input_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_input_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"
@@ -66,6 +68,7 @@ UiSceneManager::UiSceneManager(VrBrowserInterface* browser,
CreateBackground();
CreateContentQuad();
CreateSecurityWarnings();
+ CreateSystemIndicators();
CreateUrlBar();
}
@@ -104,6 +107,30 @@ 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<AudioInputIndicator>(256);
mthiesse 2017/05/12 19:44:50 Use 512 width like the permanent security warning?
acondor_ 2017/05/12 20:09:51 These are smaller and look perfect as is.
+ element->set_id(AllocateId());
+ element->set_translation({-0.3, 0.8, -1.9});
+ element->set_size({0.4, 0, 1});
+ audio_input_indicator_ = element.get();
+ browser_ui_elements_.push_back(element.get());
+ scene_->AddUiElement(std::move(element));
mthiesse 2017/05/12 19:44:50 Should hide these initially.
acondor_ 2017/05/12 20:09:51 Done.
+
+ element = base::MakeUnique<VideoInputIndicator>(256);
+ element->set_id(AllocateId());
+ element->set_translation({0.3, 0.8, -1.9});
mthiesse 2017/05/12 19:44:50 Add TODO to not position them on top of each other
acondor_ 2017/05/12 20:09:51 The TODO above should cover this. Currently, one g
+ element->set_size({0.4, 0, 1});
+ audio_input_indicator_ = element.get();
+ browser_ui_elements_.push_back(element.get());
+ scene_->AddUiElement(std::move(element));
+
+ // TODO(asimjour): Hook system updates to show/hide indicators.
+}
+
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