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