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

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

Issue 2960903002: VR: Use ToolbarModel to drive VR URL bar state. (Closed)
Patch Set: Update toolbar build file to include vector icons for Android. Created 3 years, 6 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/toolbar_state.cc
diff --git a/chrome/browser/android/vr_shell/toolbar_state.cc b/chrome/browser/android/vr_shell/toolbar_state.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d752f7f243d72d194c808e33a95485f0079818a5
--- /dev/null
+++ b/chrome/browser/android/vr_shell/toolbar_state.cc
@@ -0,0 +1,37 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/vr_shell/toolbar_state.h"
+
+namespace vr_shell {
+
+ToolbarState::ToolbarState()
+ : gurl(GURL()),
+ security_level(security_state::SecurityLevel::NONE),
+ vector_icon(nullptr),
+ should_display_url(true) {}
+
+ToolbarState::ToolbarState(const GURL& url,
+ security_state::SecurityLevel level,
+ const gfx::VectorIcon* icon,
+ base::string16 verbose_text,
+ bool display_url)
+ : gurl(url),
+ security_level(level),
+ vector_icon(icon),
+ secure_verbose_text(verbose_text),
+ should_display_url(display_url) {}
+
+bool ToolbarState::operator==(const ToolbarState& other) const {
+ return (gurl == other.gurl && security_level == other.security_level &&
+ vector_icon == other.vector_icon &&
+ should_display_url == other.should_display_url &&
+ secure_verbose_text == other.secure_verbose_text);
+}
+
+bool ToolbarState::operator!=(const ToolbarState& other) const {
+ return !(*this == other);
+}
+
+} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/toolbar_state.h ('k') | chrome/browser/android/vr_shell/ui_elements/transient_url_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698