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

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

Issue 2440823002: Cut VrShell dependency on WebUi. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a0c5c5069640ec008dbfd2c6f9b9fce8ffa13b95..315c013f2a6d81fc7969da3ba65fdaa087b7682e 100644
--- a/chrome/browser/android/vr_shell/ui_interface.h
+++ b/chrome/browser/android/vr_shell/ui_interface.h
@@ -8,10 +8,13 @@
#include "base/macros.h"
#include "base/values.h"
-class VrShellUIMessageHandler;
-
namespace vr_shell {
+class UiCommandHandler {
bshe 2016/10/20 22:26:03 nit: perhaps add delegate to name since this is es
cjgrant 2016/10/21 13:44:39 Hmmm, I see this as an interface rather than deleg
+ public:
+ virtual void SendCommandToUi(const base::Value& value) = 0;
+};
+
// This class manages the communication of browser state from VR shell to the
// HTML UI. State information is asynchronous and unidirectional.
class UiInterface {
@@ -29,12 +32,12 @@ class UiInterface {
// Called by WebUI when starting VR.
void OnDomContentsLoaded();
- void SetUiMessageHandler(VrShellUIMessageHandler* handler);
+ void SetUiCommandHandler(UiCommandHandler* handler);
private:
void FlushUpdates();
- VrShellUIMessageHandler* handler_;
+ UiCommandHandler* handler_;
bool loaded_ = false;
base::DictionaryValue updates_;
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698