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

Unified Diff: components/proximity_auth/webui/proximity_auth_webui_handler.h

Issue 1302313004: Replace ProximityAuthUIDelegate with ProximityAuthClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proximity_auth_client
Patch Set: Created 5 years, 4 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: components/proximity_auth/webui/proximity_auth_webui_handler.h
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.h b/components/proximity_auth/webui/proximity_auth_webui_handler.h
index ff983f07c362128ab71c9f0a63ea3c0cc6e29bd7..74f0ac9e55d2cb68135b56f3b6976319d4df0681 100644
--- a/components/proximity_auth/webui/proximity_auth_webui_handler.h
+++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h
@@ -15,7 +15,7 @@
#include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h"
#include "components/proximity_auth/cryptauth/cryptauth_gcm_manager.h"
#include "components/proximity_auth/logging/log_buffer.h"
-#include "components/proximity_auth/webui/proximity_auth_ui_delegate.h"
+#include "components/proximity_auth/proximity_auth_client.h"
#include "content/public/browser/web_ui_message_handler.h"
namespace base {
@@ -47,8 +47,9 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
public ConnectionObserver,
public ClientObserver {
public:
- // |delegate| is not owned and must outlive this instance.
- explicit ProximityAuthWebUIHandler(ProximityAuthUIDelegate* delegate);
+ // |client_| is not owned and must outlive this instance.
+ explicit ProximityAuthWebUIHandler(
+ ProximityAuthClient* proximity_auth_client);
~ProximityAuthWebUIHandler() override;
// content::WebUIMessageHandler:
@@ -153,7 +154,7 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
scoped_ptr<base::ListValue> GetUnlockKeysList();
// The delegate used to fetch dependencies. Must outlive this instance.
- ProximityAuthUIDelegate* delegate_;
+ ProximityAuthClient* proximity_auth_client_;
// Creates CryptAuth client instances to make API calls.
scoped_ptr<CryptAuthClientFactory> cryptauth_client_factory_;
@@ -167,9 +168,10 @@ class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
// Member variables related to CryptAuth debugging.
// TODO(tengs): These members are temporarily used for development.
scoped_ptr<PrefService> pref_service;
sacomoto 2015/08/27 12:09:17 Please remove this too.
Tim Song 2015/08/27 18:28:03 Done.
- scoped_ptr<CryptAuthGCMManager> gcm_manager_;
- scoped_ptr<CryptAuthEnrollmentManager> enrollment_manager_;
- scoped_ptr<CryptAuthDeviceManager> device_manager_;
+
+ // True if we get a message from the loaded WebContents to know that it is
+ // initialized, and we can inject JavaScript.
+ bool web_contents_initialized_;
// Member variables for connecting to and authenticating the remote device.
// TODO(tengs): Support multiple simultaenous connections.

Powered by Google App Engine
This is Rietveld 408576698