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

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

Issue 2888283005: VR: Fix HTTP warning staying visible after exiting WebVR. (Closed)
Patch Set: Rename to debug_id_ and UiElementDebugId 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
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 bcabd907ff32f1ba0badcfedd5b4fd8ccaceaeee..baf430db77bc099fd0bd22e6907bc102a0f72a1d 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -14,6 +14,7 @@
#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/ui_element_debug_id.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"
@@ -84,6 +85,7 @@ UiSceneManager::UiSceneManager(VrBrowserInterface* browser,
CreateCloseButton();
ConfigureScene();
+ ConfigureSecurityWarnings();
}
UiSceneManager::~UiSceneManager() {}
@@ -94,6 +96,7 @@ void UiSceneManager::CreateSecurityWarnings() {
// TODO(mthiesse): Programatically compute the proper texture size for these
// textured UI elements.
element = base::MakeUnique<PermanentSecurityWarning>(512);
+ element->set_debug_id(kWebVrPermanentHttpSecurityWarning);
element->set_id(AllocateId());
element->set_fill(vr_shell::Fill::NONE);
element->set_size({kPermanentWarningWidth, kPermanentWarningHeight, 1});
@@ -109,6 +112,7 @@ void UiSceneManager::CreateSecurityWarnings() {
scene_->AddUiElement(std::move(element));
element = base::MakeUnique<TransientSecurityWarning>(1024);
+ element->set_debug_id(kWebVrTransientHttpSecurityWarning);
element->set_id(AllocateId());
element->set_fill(vr_shell::Fill::NONE);
element->set_size({kTransientWarningWidth, kTransientWarningHeight, 1});
@@ -249,6 +253,7 @@ void UiSceneManager::CreateCloseButton() {
std::unique_ptr<Button> element = base::MakeUnique<Button>(
base::Bind(&UiSceneManager::OnCloseButtonClicked, base::Unretained(this)),
base::MakeUnique<CloseButtonTexture>());
+ element->set_debug_id(kCloseButton);
element->set_id(AllocateId());
element->set_fill(vr_shell::Fill::NONE);
element->set_translation(
@@ -268,6 +273,7 @@ void UiSceneManager::SetWebVrMode(bool web_vr) {
return;
web_vr_mode_ = web_vr;
ConfigureScene();
+ ConfigureSecurityWarnings();
}
void UiSceneManager::ConfigureScene() {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene.cc ('k') | chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698