Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_ | |
| 7 | |
| 8 #include "chrome/browser/android/vr_shell/toolbar_state.h" | |
| 9 #include "chrome/browser/android/vr_shell/ui_interface.h" | |
| 10 | |
| 11 class ToolbarModel; | |
| 12 class ToolbarModelDelegate; | |
| 13 | |
| 14 namespace vr_shell { | |
| 15 | |
| 16 class UiInterface; | |
| 17 | |
| 18 // 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
| |
| 19 // snapshot of the toolbar state to the UI. | |
| 20 class ToolbarHelper { | |
| 21 public: | |
| 22 ToolbarHelper(UiInterface* ui, ToolbarModelDelegate* delegate); | |
| 23 virtual ~ToolbarHelper(); | |
| 24 | |
| 25 // Poll ToolbarModel and post an update to the UI if state has changed. | |
| 26 void Update(); | |
| 27 | |
| 28 private: | |
| 29 UiInterface* ui_; | |
| 30 std::unique_ptr<ToolbarModel> toolbar_model_; | |
| 31 ToolbarState current_state_; | |
| 32 }; | |
| 33 | |
| 34 } // namespace vr_shell | |
| 35 | |
| 36 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TOOLBAR_HELPER_H_ | |
| OLD | NEW |