Add ICU message format support
[chromium-blink-merge.git] / content / browser / media / webrtc_internals_message_handler.h
blobb27e7f0abb6dc585d177009ddc7bc6fbcfd7a75e
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_
6 #define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_
8 #include "base/memory/ref_counted.h"
9 #include "content/browser/media/webrtc_internals_ui_observer.h"
10 #include "content/public/browser/web_ui_message_handler.h"
12 namespace base {
13 class ListValue;
14 } // namespace base
16 namespace content {
18 // This class handles messages to and from WebRTCInternalsUI.
19 // It delegates all its work to WebRTCInternalsProxy on the IO thread.
20 class WebRTCInternalsMessageHandler : public WebUIMessageHandler,
21 public WebRTCInternalsUIObserver{
22 public:
23 WebRTCInternalsMessageHandler();
24 ~WebRTCInternalsMessageHandler() override;
26 // WebUIMessageHandler implementation.
27 void RegisterMessages() override;
29 // WebRTCInternalsUIObserver override.
30 void OnUpdate(const std::string& command, const base::Value* args) override;
32 private:
33 // Javascript message handler.
34 void OnGetAllStats(const base::ListValue* list);
35 void OnSetAecRecordingEnabled(bool enable, const base::ListValue* list);
36 void OnDOMLoadDone(const base::ListValue* list);
38 DISALLOW_COPY_AND_ASSIGN(WebRTCInternalsMessageHandler);
41 } // namespace content
43 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_MESSAGE_HANDLER_H_