Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: chrome/browser/android/vr_shell/ui_interface.h

Issue 2866853002: VR: Wire VrShell UI-related state to the scene manager. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/ui_interface.h
diff --git a/chrome/browser/android/vr_shell/ui_interface.h b/chrome/browser/android/vr_shell/ui_interface.h
index 23bfdd112834714aadd4b315045df391be7e4cba..89c86c74ebf707c3108895793c6d97f3c20ce36c 100644
--- a/chrome/browser/android/vr_shell/ui_interface.h
+++ b/chrome/browser/android/vr_shell/ui_interface.h
@@ -5,12 +5,6 @@
#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_
#define CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_
-#include <memory>
-#include <string>
-
-#include "base/macros.h"
-#include "base/values.h"
-
class GURL;
namespace vr_shell {
@@ -19,11 +13,6 @@ namespace vr_shell {
// HTML UI. State information is asynchronous and unidirectional.
class UiInterface {
public:
- enum Mode {
- STANDARD = 0,
- WEB_VR,
- };
-
enum Direction {
NONE = 0,
LEFT,
@@ -32,30 +21,25 @@ class UiInterface {
DOWN,
};
- explicit UiInterface(Mode initial_mode);
- virtual ~UiInterface() = default;
-
- // Set HTML UI state or pass events.
- void SetMode(Mode mode);
- void SetFullscreen(bool enabled);
- void SetSecurityLevel(int level);
- void SetWebVRSecureOrigin(bool secure);
- void SetLoading(bool loading);
- void SetLoadProgress(double progress);
- void InitTabList();
- void AppendToTabList(bool incognito, int id, const base::string16& title);
- void FlushTabList();
- void UpdateTab(bool incognito, int id, const std::string& title);
- void RemoveTab(bool incognito, int id);
- void SetURL(const GURL& url);
- void HandleAppButtonGesturePerformed(Direction direction);
- void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward);
-
- private:
- Mode mode_;
- bool fullscreen_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(UiInterface);
+ virtual ~UiInterface() {}
+
+ virtual void SetWebVr(bool enabled) = 0;
mthiesse 2017/05/08 16:04:55 nit: enabled is a strange name for this...
cjgrant 2017/05/08 19:17:22 Done. I renamed this to SetWebVrMode, to match el
+ virtual void SetURL(const GURL& url);
+ virtual void SetFullscreen(bool enabled);
+ virtual void SetSecurityLevel(int level);
+ virtual void SetWebVRSecureOrigin(bool secure);
+ virtual void SetLoading(bool loading);
+ virtual void SetLoadProgress(double progress);
+ virtual void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward);
+
+ // Tab handling.
+ virtual void InitTabList() {}
+ virtual void AppendToTabList(bool incognito,
+ int id,
+ const base::string16& title) {}
+ virtual void FlushTabList() {}
+ virtual void UpdateTab(bool incognito, int id, const std::string& title) {}
+ virtual void RemoveTab(bool incognito, int id) {}
};
} // namespace vr_shell

Powered by Google App Engine
This is Rietveld 408576698