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

Side by Side Diff: chrome/browser/extensions/api/omnibox/omnibox_api.h

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | 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 (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_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 23
24 class Profile; 24 class Profile;
25 class TemplateURL; 25 class TemplateURL;
26 class TemplateURLService; 26 class TemplateURLService;
27 27
28 namespace base { 28 namespace base {
29 class ListValue; 29 class ListValue;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 class BrowserContext;
33 class WebContents; 34 class WebContents;
34 } 35 }
35 36
36 namespace gfx { 37 namespace gfx {
37 class Image; 38 class Image;
38 } 39 }
39 40
40 namespace extensions { 41 namespace extensions {
41 42
42 // Event router class for events related to the omnibox API. 43 // Event router class for events related to the omnibox API.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 protected: 79 protected:
79 virtual ~OmniboxSendSuggestionsFunction() {} 80 virtual ~OmniboxSendSuggestionsFunction() {}
80 81
81 // ExtensionFunction: 82 // ExtensionFunction:
82 virtual bool RunImpl() OVERRIDE; 83 virtual bool RunImpl() OVERRIDE;
83 }; 84 };
84 85
85 class OmniboxAPI : public ProfileKeyedAPI, 86 class OmniboxAPI : public ProfileKeyedAPI,
86 public content::NotificationObserver { 87 public content::NotificationObserver {
87 public: 88 public:
88 explicit OmniboxAPI(Profile* profile); 89 explicit OmniboxAPI(content::BrowserContext* context);
89 virtual ~OmniboxAPI(); 90 virtual ~OmniboxAPI();
90 91
91 // ProfileKeyedAPI implementation. 92 // ProfileKeyedAPI implementation.
92 static ProfileKeyedAPIFactory<OmniboxAPI>* GetFactoryInstance(); 93 static ProfileKeyedAPIFactory<OmniboxAPI>* GetFactoryInstance();
93 94
94 // Convenience method to get the OmniboxAPI for a profile. 95 // Convenience method to get the OmniboxAPI for a profile.
95 static OmniboxAPI* Get(Profile* profile); 96 static OmniboxAPI* Get(content::BrowserContext* context);
96 97
97 // content::NotificationObserver implementation. 98 // content::NotificationObserver implementation.
98 virtual void Observe(int type, 99 virtual void Observe(int type,
99 const content::NotificationSource& source, 100 const content::NotificationSource& source,
100 const content::NotificationDetails& details) OVERRIDE; 101 const content::NotificationDetails& details) OVERRIDE;
101 102
102 // BrowserContextKeyedService implementation. 103 // BrowserContextKeyedService implementation.
103 virtual void Shutdown() OVERRIDE; 104 virtual void Shutdown() OVERRIDE;
104 105
105 // Returns the icon to display in the omnibox for the given extension. 106 // Returns the icon to display in the omnibox for the given extension.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 AutocompleteMatch* match); 166 AutocompleteMatch* match);
166 167
167 // This function converts style information populated by the JSON schema 168 // This function converts style information populated by the JSON schema
168 // // compiler into an ACMatchClassifications object. 169 // // compiler into an ACMatchClassifications object.
169 ACMatchClassifications StyleTypesToACMatchClassifications( 170 ACMatchClassifications StyleTypesToACMatchClassifications(
170 const api::omnibox::SuggestResult &suggestion); 171 const api::omnibox::SuggestResult &suggestion);
171 172
172 } // namespace extensions 173 } // namespace extensions
173 174
174 #endif // CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_ 175 #endif // CHROME_BROWSER_EXTENSIONS_API_OMNIBOX_OMNIBOX_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/messaging/message_service.cc ('k') | chrome/browser/extensions/api/omnibox/omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698