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

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

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 months 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 | Annotate | Revision Log
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_EXTENSIONS_MEDIA_PLAYER_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_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 "base/memory/scoped_ptr.h"
13 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 13 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
14 #include "chrome/browser/extensions/extension_function.h" 14 #include "chrome/browser/extensions/extension_function.h"
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace extensions { 18 namespace extensions {
19 class MediaPlayerEventRouter; 19 class MediaPlayerEventRouter;
20 20
21 // Implements the chrome.mediaPlayerPrivate.play method. 21 // Implements the chrome.mediaPlayerPrivate.play method.
22 class PlayMediaplayerFunction : public SyncExtensionFunction { 22 class MediaPlayerPrivatePlayFunction : public SyncExtensionFunction {
23 public: 23 public:
24 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.play", MEDIAPLAYERPRIVATE_PLAY) 24 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.play", MEDIAPLAYERPRIVATE_PLAY)
25 25
26 protected: 26 protected:
27 virtual ~PlayMediaplayerFunction() {} 27 virtual ~MediaPlayerPrivatePlayFunction() {}
28 28
29 // SyncExtensionFunction overrides. 29 // SyncExtensionFunction overrides.
30 virtual bool RunImpl() OVERRIDE; 30 virtual bool RunImpl() OVERRIDE;
31 }; 31 };
32 32
33 // Implements the chrome.mediaPlayerPrivate.getPlaylist method. 33 // Implements the chrome.mediaPlayerPrivate.getPlaylist method.
34 class GetPlaylistMediaplayerFunction : public SyncExtensionFunction { 34 class MediaPlayerPrivateGetPlaylistFunction : public SyncExtensionFunction {
35 public: 35 public:
36 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.getPlaylist", 36 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.getPlaylist",
37 MEDIAPLAYERPRIVATE_GETPLAYLIST) 37 MEDIAPLAYERPRIVATE_GETPLAYLIST)
38 38
39 protected: 39 protected:
40 virtual ~GetPlaylistMediaplayerFunction() {} 40 virtual ~MediaPlayerPrivateGetPlaylistFunction() {}
41 41
42 // SyncExtensionFunction overrides. 42 // SyncExtensionFunction overrides.
43 virtual bool RunImpl() OVERRIDE; 43 virtual bool RunImpl() OVERRIDE;
44 }; 44 };
45 45
46 // Implements the chrome.mediaPlayerPrivate.setWindowHeight method. 46 // Implements the chrome.mediaPlayerPrivate.setWindowHeight method.
47 class SetWindowHeightMediaplayerFunction : public SyncExtensionFunction { 47 class MediaPlayerPrivateSetWindowHeightFunction : public SyncExtensionFunction {
48 public: 48 public:
49 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.setWindowHeight", 49 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.setWindowHeight",
50 MEDIAPLAYERPRIVATE_SETWINDOWHEIGHT) 50 MEDIAPLAYERPRIVATE_SETWINDOWHEIGHT)
51 51
52 protected: 52 protected:
53 virtual ~SetWindowHeightMediaplayerFunction() {} 53 virtual ~MediaPlayerPrivateSetWindowHeightFunction() {}
54 54
55 // SyncExtensionFunction overrides. 55 // SyncExtensionFunction overrides.
56 virtual bool RunImpl() OVERRIDE; 56 virtual bool RunImpl() OVERRIDE;
57 }; 57 };
58 58
59 // Implements the chrome.mediaPlayerPrivate.closeWindow method. 59 // Implements the chrome.mediaPlayerPrivate.closeWindow method.
60 class CloseWindowMediaplayerFunction : public SyncExtensionFunction { 60 class MediaPlayerPrivateCloseWindowFunction : public SyncExtensionFunction {
61 public: 61 public:
62 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.closeWindow", 62 DECLARE_EXTENSION_FUNCTION("mediaPlayerPrivate.closeWindow",
63 MEDIAPLAYERPRIVATE_CLOSEWINDOW) 63 MEDIAPLAYERPRIVATE_CLOSEWINDOW)
64 64
65 protected: 65 protected:
66 virtual ~CloseWindowMediaplayerFunction() {} 66 virtual ~MediaPlayerPrivateCloseWindowFunction() {}
67 67
68 // SyncExtensionFunction overrides. 68 // SyncExtensionFunction overrides.
69 virtual bool RunImpl() OVERRIDE; 69 virtual bool RunImpl() OVERRIDE;
70 }; 70 };
71 71
72 class MediaPlayerAPI : public ProfileKeyedAPI { 72 class MediaPlayerAPI : public ProfileKeyedAPI {
73 public: 73 public:
74 explicit MediaPlayerAPI(Profile* profile); 74 explicit MediaPlayerAPI(Profile* profile);
75 virtual ~MediaPlayerAPI(); 75 virtual ~MediaPlayerAPI();
76 76
(...skipping 17 matching lines...) Expand all
94 static const bool kServiceIsNULLWhileTesting = true; 94 static const bool kServiceIsNULLWhileTesting = true;
95 95
96 scoped_ptr<MediaPlayerEventRouter> media_player_event_router_; 96 scoped_ptr<MediaPlayerEventRouter> media_player_event_router_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAPI); 98 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAPI);
99 }; 99 };
100 100
101 } // namespace extensions 101 } // namespace extensions
102 102
103 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_ 103 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698