OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ |
6 #define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/browser/media/webrtc_internals_ui_observer.h" | 9 #include "content/browser/media/webrtc_internals_ui_observer.h" |
10 #include "content/public/browser/web_ui_message_handler.h" | 10 #include "content/public/browser/web_ui_message_handler.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class ListValue; | 13 class ListValue; |
14 } // namespace base | 14 } // namespace base |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 // This class handles messages to and from WebRTCInternalsUI. | 18 // This class handles messages to and from WebRTCInternalsUI. |
19 // It delegates all its work to WebRTCInternalsProxy on the IO thread. | 19 // It delegates all its work to WebRTCInternalsProxy on the IO thread. |
20 class WebRTCInternalsMessageHandler : public WebUIMessageHandler, | 20 class WebRTCInternalsMessageHandler : public WebUIMessageHandler, |
21 public WebRTCInternalsUIObserver{ | 21 public WebRTCInternalsUIObserver{ |
22 public: | 22 public: |
23 WebRTCInternalsMessageHandler(); | 23 WebRTCInternalsMessageHandler(); |
24 virtual ~WebRTCInternalsMessageHandler(); | 24 virtual ~WebRTCInternalsMessageHandler(); |
25 | 25 |
26 // WebUIMessageHandler implementation. | 26 // WebUIMessageHandler implementation. |
27 virtual void RegisterMessages() OVERRIDE; | 27 virtual void RegisterMessages() override; |
28 | 28 |
29 // WebRTCInternalsUIObserver override. | 29 // WebRTCInternalsUIObserver override. |
30 virtual void OnUpdate(const std::string& command, | 30 virtual void OnUpdate(const std::string& command, |
31 const base::Value* args) OVERRIDE; | 31 const base::Value* args) override; |
32 | 32 |
33 private: | 33 private: |
34 // Javascript message handler. | 34 // Javascript message handler. |
35 void OnGetAllStats(const base::ListValue* list); | 35 void OnGetAllStats(const base::ListValue* list); |
36 void OnSetAecRecordingEnabled(bool enable, const base::ListValue* list); | 36 void OnSetAecRecordingEnabled(bool enable, const base::ListValue* list); |
37 void OnDOMLoadDone(const base::ListValue* list); | 37 void OnDOMLoadDone(const base::ListValue* list); |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(WebRTCInternalsMessageHandler); | 39 DISALLOW_COPY_AND_ASSIGN(WebRTCInternalsMessageHandler); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace content | 42 } // namespace content |
43 | 43 |
44 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ | 44 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |