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 #include "chrome/browser/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/automation/automation_provider.h" | 27 #include "chrome/browser/automation/automation_provider.h" |
28 #include "chrome/browser/automation/automation_provider_json.h" | 28 #include "chrome/browser/automation/automation_provider_json.h" |
29 #include "chrome/browser/bookmarks/bookmark_model.h" | 29 #include "chrome/browser/bookmarks/bookmark_model.h" |
30 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 30 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
31 #include "chrome/browser/browser_process.h" | 31 #include "chrome/browser/browser_process.h" |
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
33 #include "chrome/browser/extensions/crx_installer.h" | 33 #include "chrome/browser/extensions/crx_installer.h" |
34 #include "chrome/browser/extensions/extension_host.h" | 34 #include "chrome/browser/extensions/extension_host.h" |
35 #include "chrome/browser/extensions/extension_process_manager.h" | 35 #include "chrome/browser/extensions/extension_process_manager.h" |
36 #include "chrome/browser/extensions/extension_service.h" | 36 #include "chrome/browser/extensions/extension_service.h" |
| 37 #include "chrome/browser/extensions/extension_system.h" |
37 #include "chrome/browser/extensions/extension_tab_util.h" | 38 #include "chrome/browser/extensions/extension_tab_util.h" |
38 #include "chrome/browser/history/history_types.h" | 39 #include "chrome/browser/history/history_types.h" |
39 #include "chrome/browser/history/top_sites.h" | 40 #include "chrome/browser/history/top_sites.h" |
40 #include "chrome/browser/infobars/infobar_tab_helper.h" | 41 #include "chrome/browser/infobars/infobar_tab_helper.h" |
41 #include "chrome/browser/metrics/metric_event_duration_details.h" | 42 #include "chrome/browser/metrics/metric_event_duration_details.h" |
42 #include "chrome/browser/notifications/balloon.h" | 43 #include "chrome/browser/notifications/balloon.h" |
43 #include "chrome/browser/notifications/balloon_collection.h" | 44 #include "chrome/browser/notifications/balloon_collection.h" |
44 #include "chrome/browser/notifications/balloon_host.h" | 45 #include "chrome/browser/notifications/balloon_host.h" |
45 #include "chrome/browser/notifications/notification.h" | 46 #include "chrome/browser/notifications/notification.h" |
46 #include "chrome/browser/notifications/notification_ui_manager.h" | 47 #include "chrome/browser/notifications/notification_ui_manager.h" |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 } | 1912 } |
1912 TabRestoreService* service = | 1913 TabRestoreService* service = |
1913 TabRestoreServiceFactory::GetForProfile(automation_->profile()); | 1914 TabRestoreServiceFactory::GetForProfile(automation_->profile()); |
1914 if (!service) { | 1915 if (!service) { |
1915 AutomationJSONReply(automation_, reply_message_.release()) | 1916 AutomationJSONReply(automation_, reply_message_.release()) |
1916 .SendError("No TabRestoreService."); | 1917 .SendError("No TabRestoreService."); |
1917 return; | 1918 return; |
1918 } | 1919 } |
1919 | 1920 |
1920 // Collect information about the apps in the new tab page. | 1921 // Collect information about the apps in the new tab page. |
1921 ExtensionService* ext_service = automation_->profile()->GetExtensionService(); | 1922 ExtensionService* ext_service = extensions::ExtensionSystem::Get( |
| 1923 automation_->profile())->extension_service(); |
1922 if (!ext_service) { | 1924 if (!ext_service) { |
1923 AutomationJSONReply(automation_, reply_message_.release()) | 1925 AutomationJSONReply(automation_, reply_message_.release()) |
1924 .SendError("No ExtensionService."); | 1926 .SendError("No ExtensionService."); |
1925 return; | 1927 return; |
1926 } | 1928 } |
1927 // Process enabled extensions. | 1929 // Process enabled extensions. |
1928 ListValue* apps_list = new ListValue(); | 1930 ListValue* apps_list = new ListValue(); |
1929 const ExtensionSet* extensions = ext_service->extensions(); | 1931 const ExtensionSet* extensions = ext_service->extensions(); |
1930 std::vector<DictionaryValue*>* enabled_apps = GetAppInfoFromExtensions( | 1932 std::vector<DictionaryValue*>* enabled_apps = GetAppInfoFromExtensions( |
1931 extensions, ext_service); | 1933 extensions, ext_service); |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2831 if (automation_) { | 2833 if (automation_) { |
2832 AutomationJSONReply(automation_, reply_message_.release()) | 2834 AutomationJSONReply(automation_, reply_message_.release()) |
2833 .SendSuccess(NULL); | 2835 .SendSuccess(NULL); |
2834 } | 2836 } |
2835 delete this; | 2837 delete this; |
2836 } | 2838 } |
2837 } else { | 2839 } else { |
2838 NOTREACHED(); | 2840 NOTREACHED(); |
2839 } | 2841 } |
2840 } | 2842 } |
OLD | NEW |