Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/chromeos/extensions/media_player_api.h

Issue 11638024: Make MediaPlayerEventRouter a PKS to decouple it from ExtensionService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
6 #define CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/extensions/extension_function.h" 13 #include "chrome/browser/extensions/extension_function.h"
14 #include "chrome/browser/profiles/profile_keyed_service.h"
15
16 class Profile;
17
18 namespace extensions {
19 class MediaPlayerEventRouter;
13 20
14 // Implements the chrome.mediaPlayerPrivate.play method. 21 // Implements the chrome.mediaPlayerPrivate.play method.
15 class PlayMediaplayerFunction : public SyncExtensionFunction { 22 class PlayMediaplayerFunction : public SyncExtensionFunction {
16 public: 23 public:
17 DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.play"); 24 DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.play");
18 25
19 protected: 26 protected:
20 virtual ~PlayMediaplayerFunction() {} 27 virtual ~PlayMediaplayerFunction() {}
21 28
22 // SyncExtensionFunction overrides. 29 // SyncExtensionFunction overrides.
(...skipping 29 matching lines...) Expand all
52 public: 59 public:
53 DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.closeWindow"); 60 DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.closeWindow");
54 61
55 protected: 62 protected:
56 virtual ~CloseWindowMediaplayerFunction() {} 63 virtual ~CloseWindowMediaplayerFunction() {}
57 64
58 // SyncExtensionFunction overrides. 65 // SyncExtensionFunction overrides.
59 virtual bool RunImpl() OVERRIDE; 66 virtual bool RunImpl() OVERRIDE;
60 }; 67 };
61 68
62 #endif // CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_ 69 class MediaPlayerAPI : public ProfileKeyedService {
70 public:
71 explicit MediaPlayerAPI(Profile* profile);
72 virtual ~MediaPlayerAPI();
73
74 // Convenience method to get the MediaPlayerAPI for a profile.
75 static MediaPlayerAPI* Get(Profile* profile);
76
77 MediaPlayerEventRouter* media_player_event_router();
78
79 private:
80 Profile* const profile_;
81
82 scoped_ptr<MediaPlayerEventRouter> media_player_event_router_;
83
84 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAPI);
85 };
86
87 } // namespace extensions
88
89 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/media_player_api.cc » ('j') | chrome/browser/chromeos/media/media_player.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698