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

Side by Side Diff: chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h

Issue 171813010: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context_ Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY_PR IVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY_PR IVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY_PR IVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY_PR IVATE_API_H_
7 7
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 #include "chrome/browser/extensions/api/api_function.h" 9 #include "chrome/browser/extensions/api/api_function.h"
10 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h" 10 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h"
11 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 11 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
12 #include "chrome/common/extensions/api/braille_display_private.h" 12 #include "chrome/common/extensions/api/braille_display_private.h"
13 #include "extensions/browser/event_router.h" 13 #include "extensions/browser/event_router.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 namespace api { 16 namespace api {
17 namespace braille_display_private { 17 namespace braille_display_private {
18 class BrailleDisplayPrivateAPIUserTest; 18 class BrailleDisplayPrivateAPIUserTest;
19 } // namespace braille_display_private 19 } // namespace braille_display_private
20 } // namespace api 20 } // namespace api
21 21
22 // Implementation of the chrome.brailleDisplayPrivate API. 22 // Implementation of the chrome.brailleDisplayPrivate API.
23 class BrailleDisplayPrivateAPI 23 class BrailleDisplayPrivateAPI
24 : public ProfileKeyedAPI, 24 : public ProfileKeyedAPI,
25 api::braille_display_private::BrailleObserver, 25 api::braille_display_private::BrailleObserver,
26 EventRouter::Observer { 26 EventRouter::Observer {
27 public: 27 public:
28 explicit BrailleDisplayPrivateAPI(Profile* profile); 28 explicit BrailleDisplayPrivateAPI(content::BrowserContext* context);
29 virtual ~BrailleDisplayPrivateAPI(); 29 virtual ~BrailleDisplayPrivateAPI();
30 30
31 // ProfileKeyedService implementation. 31 // ProfileKeyedService implementation.
32 virtual void Shutdown() OVERRIDE; 32 virtual void Shutdown() OVERRIDE;
33 33
34 // ProfileKeyedAPI implementation. 34 // ProfileKeyedAPI implementation.
35 static ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>* GetFactoryInstance(); 35 static ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>* GetFactoryInstance();
36 36
37 // BrailleObserver implementation. 37 // BrailleObserver implementation.
38 virtual void OnDisplayStateChanged( 38 virtual void OnDisplayStateChanged(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 virtual bool Respond() OVERRIDE; 102 virtual bool Respond() OVERRIDE;
103 103
104 private: 104 private:
105 scoped_ptr<braille_display_private::WriteDots::Params> params_; 105 scoped_ptr<braille_display_private::WriteDots::Params> params_;
106 }; 106 };
107 107
108 } // namespace api 108 } // namespace api
109 } // namespace extensions 109 } // namespace extensions
110 110
111 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY _PRIVATE_API_H_ 111 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY _PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698