OLD | NEW |
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_COMMANDS_COMMAND_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 public content::NotificationObserver { | 39 public content::NotificationObserver { |
40 public: | 40 public: |
41 // An enum specifying whether to fetch all extension commands or only active | 41 // An enum specifying whether to fetch all extension commands or only active |
42 // ones. | 42 // ones. |
43 enum QueryType { | 43 enum QueryType { |
44 ALL, | 44 ALL, |
45 ACTIVE_ONLY, | 45 ACTIVE_ONLY, |
46 }; | 46 }; |
47 | 47 |
48 // Register prefs for keybinding. | 48 // Register prefs for keybinding. |
49 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 49 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
50 | 50 |
51 // Constructs a CommandService object for the given profile. | 51 // Constructs a CommandService object for the given profile. |
52 explicit CommandService(Profile* profile); | 52 explicit CommandService(Profile* profile); |
53 virtual ~CommandService(); | 53 virtual ~CommandService(); |
54 | 54 |
55 // ProfileKeyedAPI implementation. | 55 // ProfileKeyedAPI implementation. |
56 static ProfileKeyedAPIFactory<CommandService>* GetFactoryInstance(); | 56 static ProfileKeyedAPIFactory<CommandService>* GetFactoryInstance(); |
57 | 57 |
58 // Convenience method to get the CommandService for a profile. | 58 // Convenience method to get the CommandService for a profile. |
59 static CommandService* Get(Profile* profile); | 59 static CommandService* Get(Profile* profile); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // A weak pointer to the profile we are associated with. Not owned by us. | 172 // A weak pointer to the profile we are associated with. Not owned by us. |
173 Profile* profile_; | 173 Profile* profile_; |
174 | 174 |
175 DISALLOW_COPY_AND_ASSIGN(CommandService); | 175 DISALLOW_COPY_AND_ASSIGN(CommandService); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace extensions | 178 } // namespace extensions |
179 | 179 |
180 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ | 180 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_H_ |
OLD | NEW |