OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_EVENT_ROUTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 class Profile; | 10 class Profile; |
11 template <typename T> struct DefaultSingletonTraits; | 11 |
| 12 namespace extensions { |
12 | 13 |
13 // Event router class for events related to Mediaplayer. | 14 // Event router class for events related to Mediaplayer. |
14 class ExtensionMediaPlayerEventRouter { | 15 class MediaPlayerEventRouter { |
15 public: | 16 public: |
16 static ExtensionMediaPlayerEventRouter* GetInstance(); | 17 explicit MediaPlayerEventRouter(Profile* profile); |
17 | 18 virtual ~MediaPlayerEventRouter(); |
18 void Init(Profile* profile); | |
19 | 19 |
20 // Send notification that next-track shortcut key was pressed. | 20 // Send notification that next-track shortcut key was pressed. |
21 void NotifyNextTrack(); | 21 void NotifyNextTrack(); |
22 | 22 |
23 // Send notification that playlist changed. | 23 // Send notification that playlist changed. |
24 void NotifyPlaylistChanged(); | 24 void NotifyPlaylistChanged(); |
25 | 25 |
26 // Send notification that previous-track shortcut key was pressed. | 26 // Send notification that previous-track shortcut key was pressed. |
27 void NotifyPrevTrack(); | 27 void NotifyPrevTrack(); |
28 | 28 |
29 // Send notification that play/pause shortcut key was pressed. | 29 // Send notification that play/pause shortcut key was pressed. |
30 void NotifyTogglePlayState(); | 30 void NotifyTogglePlayState(); |
31 | 31 |
32 private: | 32 private: |
33 Profile* profile_; | 33 Profile* profile_; |
34 | 34 |
35 ExtensionMediaPlayerEventRouter(); | 35 DISALLOW_COPY_AND_ASSIGN(MediaPlayerEventRouter); |
36 friend struct DefaultSingletonTraits<ExtensionMediaPlayerEventRouter>; | |
37 DISALLOW_COPY_AND_ASSIGN(ExtensionMediaPlayerEventRouter); | |
38 }; | 36 }; |
39 | 37 |
| 38 } // namespace extensions |
| 39 |
40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_EVENT_ROUTER_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_EVENT_ROUTER_H_ |
OLD | NEW |