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

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 12680004: Remove chrome/ code to handle App Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 7 years, 9 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_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class ExtensionToolbarModel; 47 class ExtensionToolbarModel;
48 class GURL; 48 class GURL;
49 class Profile; 49 class Profile;
50 class Version; 50 class Version;
51 51
52 namespace base { 52 namespace base {
53 class SequencedTaskRunner; 53 class SequencedTaskRunner;
54 } 54 }
55 55
56 namespace extensions { 56 namespace extensions {
57 class AppNotificationManager;
58 class AppSyncData; 57 class AppSyncData;
59 class BrowserEventRouter; 58 class BrowserEventRouter;
60 class ComponentLoader; 59 class ComponentLoader;
61 class ContentSettingsStore; 60 class ContentSettingsStore;
62 class CrxInstaller; 61 class CrxInstaller;
63 class ExtensionActionStorageManager; 62 class ExtensionActionStorageManager;
64 class ExtensionSyncData; 63 class ExtensionSyncData;
65 class ExtensionSystem; 64 class ExtensionSystem;
66 class ExtensionUpdater; 65 class ExtensionUpdater;
67 class PendingExtensionManager; 66 class PendingExtensionManager;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 const base::FilePath& install_directory() const { return install_directory_; } 222 const base::FilePath& install_directory() const { return install_directory_; }
224 223
225 extensions::ProcessMap* process_map() { return &process_map_; } 224 extensions::ProcessMap* process_map() { return &process_map_; }
226 225
227 // Whether this extension can run in an incognito window. 226 // Whether this extension can run in an incognito window.
228 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; 227 virtual bool IsIncognitoEnabled(const std::string& extension_id) const;
229 virtual void SetIsIncognitoEnabled(const std::string& extension_id, 228 virtual void SetIsIncognitoEnabled(const std::string& extension_id,
230 bool enabled); 229 bool enabled);
231 230
232 // When app notification setup is done, we call this to save the developer's
233 // oauth client id which we'll need at uninstall time to revoke the oauth
234 // permission grant for sending notifications.
235 virtual void SetAppNotificationSetupDone(const std::string& extension_id,
236 const std::string& oauth_client_id);
237
238 virtual void SetAppNotificationDisabled(const std::string& extension_id,
239 bool value);
240
241 // Updates the app launcher value for the moved extension so that it is now 231 // Updates the app launcher value for the moved extension so that it is now
242 // located after the given predecessor and before the successor. This will 232 // located after the given predecessor and before the successor. This will
243 // trigger a sync if needed. Empty strings are used to indicate no successor 233 // trigger a sync if needed. Empty strings are used to indicate no successor
244 // or predecessor. 234 // or predecessor.
245 void OnExtensionMoved(const std::string& moved_extension_id, 235 void OnExtensionMoved(const std::string& moved_extension_id,
246 const std::string& predecessor_extension_id, 236 const std::string& predecessor_extension_id,
247 const std::string& successor_extension_id); 237 const std::string& successor_extension_id);
248 238
249 // Returns true if the given extension can see events and data from another 239 // Returns true if the given extension can see events and data from another
250 // sub-profile (incognito to original profile, or vice versa). 240 // sub-profile (incognito to original profile, or vice versa).
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 538
549 // Note that this may return NULL if autoupdate is not turned on. 539 // Note that this may return NULL if autoupdate is not turned on.
550 extensions::ExtensionUpdater* updater(); 540 extensions::ExtensionUpdater* updater();
551 541
552 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } 542 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; }
553 543
554 ExtensionsQuotaService* quota_service() { return &quota_service_; } 544 ExtensionsQuotaService* quota_service() { return &quota_service_; }
555 545
556 extensions::MenuManager* menu_manager() { return &menu_manager_; } 546 extensions::MenuManager* menu_manager() { return &menu_manager_; }
557 547
558 extensions::AppNotificationManager* app_notification_manager() {
559 return app_notification_manager_.get();
560 }
561
562 extensions::BrowserEventRouter* browser_event_router() { 548 extensions::BrowserEventRouter* browser_event_router() {
563 return browser_event_router_.get(); 549 return browser_event_router_.get();
564 } 550 }
565 551
566 // Notify the frontend that there was an error loading an extension. 552 // Notify the frontend that there was an error loading an extension.
567 // This method is public because UnpackedInstaller and InstalledLoader 553 // This method is public because UnpackedInstaller and InstalledLoader
568 // can post to here. 554 // can post to here.
569 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency 555 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency
570 // of these classes on ExtensionService. 556 // of these classes on ExtensionService.
571 void ReportExtensionLoadError(const base::FilePath& extension_path, 557 void ReportExtensionLoadError(const base::FilePath& extension_path,
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 921
936 content::NotificationRegistrar registrar_; 922 content::NotificationRegistrar registrar_;
937 PrefChangeRegistrar pref_change_registrar_; 923 PrefChangeRegistrar pref_change_registrar_;
938 924
939 // Keeps track of loading and unloading component extensions. 925 // Keeps track of loading and unloading component extensions.
940 scoped_ptr<extensions::ComponentLoader> component_loader_; 926 scoped_ptr<extensions::ComponentLoader> component_loader_;
941 927
942 // Keeps track of menu items added by extensions. 928 // Keeps track of menu items added by extensions.
943 extensions::MenuManager menu_manager_; 929 extensions::MenuManager menu_manager_;
944 930
945 // Keeps track of app notifications.
946 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_;
947
948 // Flag to make sure event routers are only initialized once. 931 // Flag to make sure event routers are only initialized once.
949 bool event_routers_initialized_; 932 bool event_routers_initialized_;
950 933
951 // TODO(yoz): None of these should be owned by ExtensionService. 934 // TODO(yoz): None of these should be owned by ExtensionService.
952 // crbug.com/159265 935 // crbug.com/159265
953 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; 936 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_;
954 937
955 // A collection of external extension providers. Each provider reads 938 // A collection of external extension providers. Each provider reads
956 // a source of external extension information. Examples include the 939 // a source of external extension information. Examples include the
957 // windows registry and external_extensions.json. 940 // windows registry and external_extensions.json.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 #endif 981 #endif
999 982
1000 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 983 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1001 InstallAppsWithUnlimtedStorage); 984 InstallAppsWithUnlimtedStorage);
1002 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 985 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1003 InstallAppsAndCheckStorageProtection); 986 InstallAppsAndCheckStorageProtection);
1004 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 987 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1005 }; 988 };
1006 989
1007 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 990 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698