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

Side by Side Diff: chrome/browser/android/vr_shell/ui_interface.h

Issue 2434013002: Implement a means of letting native VR Shell control the HTML UI. (Closed)
Patch Set: Remove use of cr.define() Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_
7
8 #include "base/macros.h"
9 #include "base/values.h"
10
11 class VrShellUIMessageHandler;
12
13 namespace vr_shell {
14
15 // This class manages the communication of browser state from VR shell to the
16 // HTML UI. State information is asynchronous and unidirectional.
17 class UiInterface {
18 public:
19 enum Mode {
20 STANDARD,
21 WEB_VR,
22 };
23
24 UiInterface();
25 virtual ~UiInterface();
26
27 void SetMode(Mode mode);
28 void SetSecureOrigin(bool secure);
29
30 // Called by WebUI when starting VR.
31 void OnDomContentsLoaded();
32 void SetUiMessageHandler(VrShellUIMessageHandler* handler);
33
34 private:
35 void FlushUpdates();
36
37 VrShellUIMessageHandler* handler_;
38 bool loaded_ = false;
39 base::DictionaryValue updates_;
40
41 DISALLOW_COPY_AND_ASSIGN(UiInterface);
42 };
43
44 } // namespace vr_shell
45
46 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/ui_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698