| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void SetLoading(bool loading); | 42 void SetLoading(bool loading); |
| 43 void SetLoadProgress(double progress); | 43 void SetLoadProgress(double progress); |
| 44 void InitTabList(); | 44 void InitTabList(); |
| 45 void AppendToTabList(bool incognito, int id, const base::string16& title); | 45 void AppendToTabList(bool incognito, int id, const base::string16& title); |
| 46 void FlushTabList(); | 46 void FlushTabList(); |
| 47 void UpdateTab(bool incognito, int id, const std::string& title); | 47 void UpdateTab(bool incognito, int id, const std::string& title); |
| 48 void RemoveTab(bool incognito, int id); | 48 void RemoveTab(bool incognito, int id); |
| 49 void SetURL(const GURL& url); | 49 void SetURL(const GURL& url); |
| 50 void SetOmniboxSuggestions(std::unique_ptr<base::Value> suggestions); | 50 void SetOmniboxSuggestions(std::unique_ptr<base::Value> suggestions); |
| 51 void HandleAppButtonClicked(); | 51 void HandleAppButtonClicked(); |
| 52 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); |
| 52 | 53 |
| 53 // Handlers for HTML UI commands and notifications. | 54 // Handlers for HTML UI commands and notifications. |
| 54 void OnDomContentsLoaded(); | 55 void OnDomContentsLoaded(); |
| 55 void HandleOmniboxInput(const base::DictionaryValue& input); | 56 void HandleOmniboxInput(const base::DictionaryValue& input); |
| 56 | 57 |
| 57 void SetUiCommandHandler(UiCommandHandler* handler); | 58 void SetUiCommandHandler(UiCommandHandler* handler); |
| 58 | 59 |
| 59 private: | 60 private: |
| 60 void FlushUpdates(); | 61 void FlushUpdates(); |
| 61 void FlushModeState(); | 62 void FlushModeState(); |
| 62 | 63 |
| 63 Mode mode_; | 64 Mode mode_; |
| 64 bool fullscreen_ = false; | 65 bool fullscreen_ = false; |
| 65 UiCommandHandler* handler_; | 66 UiCommandHandler* handler_; |
| 66 bool loaded_ = false; | 67 bool loaded_ = false; |
| 67 base::DictionaryValue updates_; | 68 base::DictionaryValue updates_; |
| 68 std::unique_ptr<base::ListValue> tab_list_; | 69 std::unique_ptr<base::ListValue> tab_list_; |
| 69 | 70 |
| 70 std::unique_ptr<VrOmnibox> omnibox_; | 71 std::unique_ptr<VrOmnibox> omnibox_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(UiInterface); | 73 DISALLOW_COPY_AND_ASSIGN(UiInterface); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace vr_shell | 76 } // namespace vr_shell |
| 76 | 77 |
| 77 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ | 78 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ |
| OLD | NEW |