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

Unified Diff: chrome/browser/android/vr_shell/toolbar_helper.h

Issue 2960903002: VR: Use ToolbarModel to drive VR URL bar state. (Closed)
Patch Set: 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_helper.h
diff --git a/chrome/browser/android/vr_shell/toolbar_helper.h b/chrome/browser/android/vr_shell/toolbar_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..114652f4e7558306f69c5f2661bb83c27e9cb4ca
--- /dev/null
+++ b/chrome/browser/android/vr_shell/toolbar_helper.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_
+
+#include "chrome/browser/android/vr_shell/toolbar_state.h"
+#include "chrome/browser/android/vr_shell/ui_interface.h"
+
+class ToolbarModel;
+class ToolbarModelDelegate;
+
+namespace vr_shell {
+
+class UiInterface;
+
+// This class houses an instance of ToolbarModel, and when asked, passes a
mthiesse 2017/06/28 00:27:08 nit: Clarify or remove "when asked"? Maybe "This
cjgrant 2017/06/28 15:14:34 Done. Your wording, except we don't update the To
+// snapshot of the toolbar state to the UI.
+class ToolbarHelper {
+ public:
+ ToolbarHelper(UiInterface* ui, ToolbarModelDelegate* delegate);
+ virtual ~ToolbarHelper();
+
+ // Poll ToolbarModel and post an update to the UI if state has changed.
+ void Update();
+
+ private:
+ UiInterface* ui_;
+ std::unique_ptr<ToolbarModel> toolbar_model_;
+ ToolbarState current_state_;
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698