OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_HANDLER_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "content/public/browser/web_ui_message_handler.h" | |
11 | |
12 class MediaInternalsProxy; | |
13 | |
14 namespace base { | |
15 class ListValue; | |
16 } | |
17 | |
18 // This class handles messages to and from MediaInternalsUI. | |
19 // It does all its work on the IO thread through the proxy below. | |
20 class MediaInternalsMessageHandler : public content::WebUIMessageHandler { | |
21 public: | |
22 MediaInternalsMessageHandler(); | |
23 virtual ~MediaInternalsMessageHandler(); | |
24 | |
25 // WebUIMessageHandler implementation. | |
26 virtual void RegisterMessages() OVERRIDE; | |
27 | |
28 // Javascript message handlers. | |
29 void OnGetEverything(const base::ListValue* list); | |
30 | |
31 // MediaInternals message handlers. | |
32 void OnUpdate(const string16& update); | |
33 | |
34 private: | |
35 scoped_refptr<MediaInternalsProxy> proxy_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(MediaInternalsMessageHandler); | |
38 }; | |
39 | |
40 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_MEDIA_INTERNALS_HANDLER_H_ | |
OLD | NEW |