Fix the duplicatedly commited composition text when switching IME.
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / media_player_api.h
blobbb84d657089d825446a7abb7d8bbf761c077b1ac
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_
8 #include <map>
9 #include <string>
10 #include <vector>
12 #include "base/memory/scoped_ptr.h"
13 #include "extensions/browser/browser_context_keyed_api_factory.h"
14 #include "extensions/browser/extension_function.h"
16 namespace content {
17 class BrowserContext;
20 namespace extensions {
21 class MediaPlayerEventRouter;
23 class MediaPlayerAPI : public BrowserContextKeyedAPI {
24 public:
25 explicit MediaPlayerAPI(content::BrowserContext* context);
26 ~MediaPlayerAPI() override;
28 // Convenience method to get the MediaPlayerAPI for a profile.
29 static MediaPlayerAPI* Get(content::BrowserContext* context);
31 MediaPlayerEventRouter* media_player_event_router();
33 // BrowserContextKeyedAPI implementation.
34 static BrowserContextKeyedAPIFactory<MediaPlayerAPI>* GetFactoryInstance();
36 private:
37 friend class BrowserContextKeyedAPIFactory<MediaPlayerAPI>;
39 content::BrowserContext* const browser_context_;
41 // BrowserContextKeyedAPI implementation.
42 static const char* service_name() {
43 return "MediaPlayerAPI";
45 static const bool kServiceRedirectedInIncognito = true;
46 static const bool kServiceIsNULLWhileTesting = true;
48 scoped_ptr<MediaPlayerEventRouter> media_player_event_router_;
50 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAPI);
53 } // namespace extensions
55 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_MEDIA_PLAYER_API_H_