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

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

Issue 2536873002: Clean up VR Shell mode transitions (and fix potential webvr startup race). (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 474e7aadc3b66b94f05e4718da090cd458c61cf3..1297974dc79002e8c22ded4467720e52437b7ef6 100644
--- a/chrome/browser/android/vr_shell/ui_interface.h
+++ b/chrome/browser/android/vr_shell/ui_interface.h
@@ -23,16 +23,19 @@ class UiInterface {
public:
enum Mode {
STANDARD,
- WEB_VR,
- MENU,
- CINEMA,
+ WEB_VR
};
- UiInterface();
+ explicit UiInterface(Mode initial_mode);
virtual ~UiInterface();
void SetMode(Mode mode);
Mode GetMode() { return mode_; }
+ void SetMenuMode(bool enabled);
+ bool GetMenuMode() { return menu_mode_; }
+ void SetCinemaMode(bool enabled);
+ bool GetCinemaMode() { return cinema_mode_; }
+
void SetSecureOrigin(bool secure);
void SetLoading(bool loading);
void SetURL(const GURL& url);
@@ -43,8 +46,11 @@ class UiInterface {
private:
void FlushUpdates();
+ void FlushModeState();
Mode mode_;
+ bool menu_mode_ = false;
+ bool cinema_mode_ = false;
UiCommandHandler* handler_;
bool loaded_ = false;
base::DictionaryValue updates_;

Powered by Google App Engine
This is Rietveld 408576698