| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 explicit UiInterface(Mode initial_mode, bool fullscreen); | 29 explicit UiInterface(Mode initial_mode, bool fullscreen); |
| 30 virtual ~UiInterface(); | 30 virtual ~UiInterface(); |
| 31 | 31 |
| 32 void SetMode(Mode mode); | 32 void SetMode(Mode mode); |
| 33 Mode GetMode() { return mode_; } | 33 Mode GetMode() { return mode_; } |
| 34 void SetMenuMode(bool enabled); | 34 void SetMenuMode(bool enabled); |
| 35 bool GetMenuMode() { return menu_mode_; } | 35 bool GetMenuMode() { return menu_mode_; } |
| 36 void SetFullscreen(bool enabled); | 36 void SetFullscreen(bool enabled); |
| 37 bool GetFullscreen() { return fullscreen_; } | 37 bool GetFullscreen() { return fullscreen_; } |
| 38 | 38 void SetSecurityLevel(int level); |
| 39 void SetSecureOrigin(bool secure); | 39 void SetWebVRSecureOrigin(bool secure); |
| 40 void SetLoading(bool loading); | 40 void SetLoading(bool loading); |
| 41 void SetURL(const GURL& url); | 41 void SetURL(const GURL& url); |
| 42 | 42 |
| 43 // Called by WebUI when starting VR. | 43 // Called by WebUI when starting VR. |
| 44 void OnDomContentsLoaded(); | 44 void OnDomContentsLoaded(); |
| 45 void SetUiCommandHandler(UiCommandHandler* handler); | 45 void SetUiCommandHandler(UiCommandHandler* handler); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void FlushUpdates(); | 48 void FlushUpdates(); |
| 49 void FlushModeState(); | 49 void FlushModeState(); |
| 50 | 50 |
| 51 Mode mode_; | 51 Mode mode_; |
| 52 bool menu_mode_ = false; | 52 bool menu_mode_ = false; |
| 53 bool fullscreen_ = false; | 53 bool fullscreen_ = false; |
| 54 UiCommandHandler* handler_; | 54 UiCommandHandler* handler_; |
| 55 bool loaded_ = false; | 55 bool loaded_ = false; |
| 56 base::DictionaryValue updates_; | 56 base::DictionaryValue updates_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(UiInterface); | 58 DISALLOW_COPY_AND_ASSIGN(UiInterface); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace vr_shell | 61 } // namespace vr_shell |
| 62 | 62 |
| 63 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ | 63 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_ |
| OLD | NEW |