Index: chrome/browser/chromeos/extensions/media_player_api.h |
diff --git a/chrome/browser/chromeos/media/media_player_extension_api.h b/chrome/browser/chromeos/extensions/media_player_api.h |
similarity index 66% |
rename from chrome/browser/chromeos/media/media_player_extension_api.h |
rename to chrome/browser/chromeos/extensions/media_player_api.h |
index 54b60a2f76b86600deb9b68f1c2679232575d703..55276a97e53a11a9de958689cb85c2c7252c8382 100644 |
--- a/chrome/browser/chromeos/media/media_player_extension_api.h |
+++ b/chrome/browser/chromeos/extensions/media_player_api.h |
@@ -2,14 +2,21 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ |
-#define CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ |
+#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_ |
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_ |
#include <map> |
#include <string> |
#include <vector> |
+#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/extensions/extension_function.h" |
+#include "chrome/browser/profiles/profile_keyed_service.h" |
+ |
+class Profile; |
+ |
+namespace extensions { |
+class MediaPlayerEventRouter; |
// Implements the chrome.mediaPlayerPrivate.play method. |
class PlayMediaplayerFunction : public SyncExtensionFunction { |
@@ -59,4 +66,24 @@ class CloseWindowMediaplayerFunction : public SyncExtensionFunction { |
virtual bool RunImpl() OVERRIDE; |
}; |
-#endif // CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ |
+class MediaPlayerAPI : public ProfileKeyedService { |
+ public: |
+ explicit MediaPlayerAPI(Profile* profile); |
+ virtual ~MediaPlayerAPI(); |
+ |
+ // Convenience method to get the MediaPlayerAPI for a profile. |
+ static MediaPlayerAPI* Get(Profile* profile); |
+ |
+ MediaPlayerEventRouter* media_player_event_router(); |
+ |
+ private: |
+ Profile* const profile_; |
+ |
+ scoped_ptr<MediaPlayerEventRouter> media_player_event_router_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MediaPlayerAPI); |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_ |