Home | History | Annotate | Download | only in media
      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 CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_HANDLER_H_
      6 #define CONTENT_BROWSER_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 namespace base {
     13 class ListValue;
     14 }
     15 
     16 namespace content {
     17 class MediaInternalsProxy;
     18 
     19 // This class handles messages to and from MediaInternalsUI.
     20 // It does all its work on the IO thread through the proxy below.
     21 class MediaInternalsMessageHandler : public WebUIMessageHandler {
     22  public:
     23   MediaInternalsMessageHandler();
     24   virtual ~MediaInternalsMessageHandler();
     25 
     26   // WebUIMessageHandler implementation.
     27   virtual void RegisterMessages() OVERRIDE;
     28 
     29   // Javascript message handlers.
     30   void OnGetEverything(const base::ListValue* list);
     31 
     32   // MediaInternals message handlers.
     33   void OnUpdate(const string16& update);
     34 
     35  private:
     36   scoped_refptr<MediaInternalsProxy> proxy_;
     37 
     38   DISALLOW_COPY_AND_ASSIGN(MediaInternalsMessageHandler);
     39 };
     40 
     41 }  // namespace content
     42 
     43 #endif  // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_HANDLER_H_
     44