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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ 5 #ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
6 #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ 6 #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
7 7
8 #include "components/proximity_auth/logging/log_buffer.h"
8 #include "content/public/browser/web_ui_message_handler.h" 9 #include "content/public/browser/web_ui_message_handler.h"
9 10
11 namespace base {
12 class ListValue;
13 }
14
10 namespace proximity_auth { 15 namespace proximity_auth {
11 16
12 class ProximityAuthService; 17 class ProximityAuthService;
13 18
14 // Handles messages from the chrome://proximity-auth page. 19 // Handles messages from the chrome://proximity-auth page.
15 class ProximityAuthWebUIHandler : public content::WebUIMessageHandler { 20 class ProximityAuthWebUIHandler : public content::WebUIMessageHandler,
21 public LogBuffer::Observer {
16 public: 22 public:
17 ProximityAuthWebUIHandler(); 23 ProximityAuthWebUIHandler();
18 ~ProximityAuthWebUIHandler() override; 24 ~ProximityAuthWebUIHandler() override;
19 25
20 // content::WebUIMessageHandler implementation. 26 // content::WebUIMessageHandler:
21 void RegisterMessages() override; 27 void RegisterMessages() override;
22 28
23 private: 29 private:
30 // LogBuffer:
Ilya Sherman 2015/05/13 00:49:57 nit: LogBuffer::Observer:
Tim Song 2015/05/13 02:24:37 Done.
31 void OnLogMessageAdded(const LogBuffer::LogMessage& log_message) override;
32 void OnLogBufferCleared() override;
33
34 // Message handler callbacks.
35 void GetLogMessages(const base::ListValue* args);
36 void ClearLogBuffer(const base::ListValue* args);
37
24 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler); 38 DISALLOW_COPY_AND_ASSIGN(ProximityAuthWebUIHandler);
25 }; 39 };
26 40
27 } // namespace proximity_auth 41 } // namespace proximity_auth
28 42
29 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ 43 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698