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

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

Issue 1135293002: Hook up PA_LOG() logs to chrome://proximity-auth WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: 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 8cc050895e9116cbffdfe01e1c4fabb3f5dde5ea..9173b4b550d7e7fda4c5fb4aaff99daae60804b7 100644
--- a/components/proximity_auth/webui/proximity_auth_webui_handler.h
+++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h
@@ -5,22 +5,36 @@
#ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
#define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
+#include "components/proximity_auth/logging/log_buffer.h"
#include "content/public/browser/web_ui_message_handler.h"
+namespace base {
+class ListValue;
+}
+
namespace proximity_auth {
class ProximityAuthService;
// Handles messages from the chrome://proximity-auth page.
-class ProximityAuthWebUIHandler : public content::WebUIMessageHandler {
+class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
+ public LogBuffer::Observer {
public:
ProximityAuthWebUIHandler();
~ProximityAuthWebUIHandler() override;
- // content::WebUIMessageHandler implementation.
+ // content::WebUIMessageHandler:
void RegisterMessages() override;
private:
+ // LogBuffer:
Ilya Sherman 2015/05/13 00:49:57 nit: LogBuffer::Observer:
Tim Song 2015/05/13 02:24:37 Done.
+ void OnLogMessageAdded(const LogBuffer::LogMessage& log_message) override;
+ void OnLogBufferCleared() override;
+
+ // Message handler callbacks.
+ void GetLogMessages(const base::ListValue* args);
+ void ClearLogBuffer(const base::ListValue* args);
+
DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler);
};

Powered by Google App Engine
This is Rietveld 408576698