| 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 // Process disabled extensions. | 2110 // Process disabled extensions. |
| 2111 const ExtensionSet* disabled_extensions = ext_service->disabled_extensions(); | 2111 const ExtensionSet* disabled_extensions = ext_service->disabled_extensions(); |
| 2112 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions( | 2112 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions( |
| 2113 disabled_extensions, ext_service); | 2113 disabled_extensions, ext_service); |
| 2114 for (std::vector<DictionaryValue*>::const_iterator app = | 2114 for (std::vector<DictionaryValue*>::const_iterator app = |
| 2115 disabled_apps->begin(); app != disabled_apps->end(); ++app) { | 2115 disabled_apps->begin(); app != disabled_apps->end(); ++app) { |
| 2116 (*app)->SetBoolean("is_disabled", true); | 2116 (*app)->SetBoolean("is_disabled", true); |
| 2117 apps_list->Append(*app); | 2117 apps_list->Append(*app); |
| 2118 } | 2118 } |
| 2119 delete disabled_apps; | 2119 delete disabled_apps; |
| 2120 // Process terminated extensions. | |
| 2121 const ExtensionSet* terminated_extensions = | |
| 2122 ext_service->terminated_extensions(); | |
| 2123 std::vector<DictionaryValue*>* terminated_apps = GetAppInfoFromExtensions( | |
| 2124 terminated_extensions, ext_service); | |
| 2125 for (std::vector<DictionaryValue*>::const_iterator app = | |
| 2126 terminated_apps->begin(); app != terminated_apps->end(); ++app) { | |
| 2127 (*app)->SetBoolean("is_disabled", true); | |
| 2128 apps_list->Append(*app); | |
| 2129 } | |
| 2130 delete terminated_apps; | |
| 2131 ntp_info_->Set("apps", apps_list); | 2120 ntp_info_->Set("apps", apps_list); |
| 2132 | 2121 |
| 2133 // Get the info that would be displayed in the recently closed section. | 2122 // Get the info that would be displayed in the recently closed section. |
| 2134 ListValue* recently_closed_list = new ListValue; | 2123 ListValue* recently_closed_list = new ListValue; |
| 2135 RecentlyClosedTabsHandler::CreateRecentlyClosedValues(service->entries(), | 2124 RecentlyClosedTabsHandler::CreateRecentlyClosedValues(service->entries(), |
| 2136 recently_closed_list); | 2125 recently_closed_list); |
| 2137 ntp_info_->Set("recently_closed", recently_closed_list); | 2126 ntp_info_->Set("recently_closed", recently_closed_list); |
| 2138 | 2127 |
| 2139 // Add default site URLs. | 2128 // Add default site URLs. |
| 2140 ListValue* default_sites_list = new ListValue; | 2129 ListValue* default_sites_list = new ListValue; |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3194 } | 3183 } |
| 3195 | 3184 |
| 3196 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3185 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3197 if (host->extension_id() == extension_id_ && | 3186 if (host->extension_id() == extension_id_ && |
| 3198 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3187 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3199 AutomationJSONReply(automation_, reply_message_.release()) | 3188 AutomationJSONReply(automation_, reply_message_.release()) |
| 3200 .SendSuccess(NULL); | 3189 .SendSuccess(NULL); |
| 3201 delete this; | 3190 delete this; |
| 3202 } | 3191 } |
| 3203 } | 3192 } |
| OLD | NEW |