| 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 "components/security_state/core/security_state.h" |
| 9 |
| 8 class GURL; | 10 class GURL; |
| 9 | 11 |
| 10 namespace vr_shell { | 12 namespace vr_shell { |
| 11 | 13 |
| 12 // This class manages the communication of browser state from VR shell to the | 14 // This class manages the communication of browser state from VR shell to the |
| 13 // HTML UI. State information is asynchronous and unidirectional. | 15 // HTML UI. State information is asynchronous and unidirectional. |
| 14 class UiInterface { | 16 class UiInterface { |
| 15 public: | 17 public: |
| 16 enum Direction { | 18 enum Direction { |
| 17 NONE = 0, | 19 NONE = 0, |
| 18 LEFT, | 20 LEFT, |
| 19 RIGHT, | 21 RIGHT, |
| 20 UP, | 22 UP, |
| 21 DOWN, | 23 DOWN, |
| 22 }; | 24 }; |
| 23 | 25 |
| 24 virtual ~UiInterface() {} | 26 virtual ~UiInterface() {} |
| 25 | 27 |
| 26 virtual void SetWebVrMode(bool enabled) = 0; | 28 virtual void SetWebVrMode(bool enabled) = 0; |
| 27 virtual void SetURL(const GURL& url) = 0; | 29 virtual void SetURL(const GURL& url) = 0; |
| 28 virtual void SetFullscreen(bool enabled) = 0; | 30 virtual void SetFullscreen(bool enabled) = 0; |
| 29 virtual void SetSecurityLevel(int level) = 0; | 31 virtual void SetSecurityLevel(security_state::SecurityLevel level) = 0; |
| 30 virtual void SetWebVrSecureOrigin(bool secure) = 0; | 32 virtual void SetWebVrSecureOrigin(bool secure) = 0; |
| 31 virtual void SetLoading(bool loading) = 0; | 33 virtual void SetLoading(bool loading) = 0; |
| 32 virtual void SetLoadProgress(float progress) = 0; | 34 virtual void SetLoadProgress(float progress) = 0; |
| 33 virtual void SetIsExiting() = 0; | 35 virtual void SetIsExiting() = 0; |
| 34 virtual void SetHistoryButtonsEnabled(bool can_go_back, | 36 virtual void SetHistoryButtonsEnabled(bool can_go_back, |
| 35 bool can_go_forward) = 0; | 37 bool can_go_forward) = 0; |
| 36 virtual void SetVideoCapturingIndicator(bool enabled) = 0; | 38 virtual void SetVideoCapturingIndicator(bool enabled) = 0; |
| 37 virtual void SetScreenCapturingIndicator(bool enabled) = 0; | 39 virtual void SetScreenCapturingIndicator(bool enabled) = 0; |
| 38 virtual void SetAudioCapturingIndicator(bool enabled) = 0; | 40 virtual void SetAudioCapturingIndicator(bool enabled) = 0; |
| 39 | 41 |
| 40 // Tab handling. | 42 // Tab handling. |
| 41 virtual void InitTabList() {} | 43 virtual void InitTabList() {} |
| 42 virtual void AppendToTabList(bool incognito, | 44 virtual void AppendToTabList(bool incognito, |
| 43 int id, | 45 int id, |
| 44 const base::string16& title) {} | 46 const base::string16& title) {} |
| 45 virtual void FlushTabList() {} | 47 virtual void FlushTabList() {} |
| 46 virtual void UpdateTab(bool incognito, int id, const std::string& title) {} | 48 virtual void UpdateTab(bool incognito, int id, const std::string& title) {} |
| 47 virtual void RemoveTab(bool incognito, int id) {} | 49 virtual void RemoveTab(bool incognito, int id) {} |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 } // namespace vr_shell | 52 } // namespace vr_shell |
| 51 | 53 |
| 52 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ | 54 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ |
| OLD | NEW |