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: 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: stop using release() 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..accd7ac8ef86581a3c3f2c05892f6f152c143736 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::Observer:
+ 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);
};
« no previous file with comments | « components/proximity_auth/webui/proximity_auth_ui.cc ('k') | components/proximity_auth/webui/proximity_auth_webui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698