| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 // Process disabled extensions. | 2057 // Process disabled extensions. |
| 2058 const ExtensionList* disabled_extensions = ext_service->disabled_extensions(); | 2058 const ExtensionList* disabled_extensions = ext_service->disabled_extensions(); |
| 2059 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions( | 2059 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions( |
| 2060 disabled_extensions, ext_service); | 2060 disabled_extensions, ext_service); |
| 2061 for (std::vector<DictionaryValue*>::const_iterator app = | 2061 for (std::vector<DictionaryValue*>::const_iterator app = |
| 2062 disabled_apps->begin(); app != disabled_apps->end(); ++app) { | 2062 disabled_apps->begin(); app != disabled_apps->end(); ++app) { |
| 2063 (*app)->SetBoolean("is_disabled", true); | 2063 (*app)->SetBoolean("is_disabled", true); |
| 2064 apps_list->Append(*app); | 2064 apps_list->Append(*app); |
| 2065 } | 2065 } |
| 2066 delete disabled_apps; | 2066 delete disabled_apps; |
| 2067 // Process terminated extensions. |
| 2068 const ExtensionList* terminated_extensions = |
| 2069 ext_service->terminated_extensions(); |
| 2070 std::vector<DictionaryValue*>* terminated_apps = GetAppInfoFromExtensions( |
| 2071 terminated_extensions, ext_service); |
| 2072 for (std::vector<DictionaryValue*>::const_iterator app = |
| 2073 terminated_apps->begin(); app != terminated_apps->end(); ++app) { |
| 2074 (*app)->SetBoolean("is_disabled", true); |
| 2075 apps_list->Append(*app); |
| 2076 } |
| 2077 delete terminated_apps; |
| 2067 ntp_info_->Set("apps", apps_list); | 2078 ntp_info_->Set("apps", apps_list); |
| 2068 | 2079 |
| 2069 // Get the info that would be displayed in the recently closed section. | 2080 // Get the info that would be displayed in the recently closed section. |
| 2070 ListValue* recently_closed_list = new ListValue; | 2081 ListValue* recently_closed_list = new ListValue; |
| 2071 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(service->entries(), | 2082 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(service->entries(), |
| 2072 recently_closed_list); | 2083 recently_closed_list); |
| 2073 ntp_info_->Set("recently_closed", recently_closed_list); | 2084 ntp_info_->Set("recently_closed", recently_closed_list); |
| 2074 | 2085 |
| 2075 // Add default site URLs. | 2086 // Add default site URLs. |
| 2076 ListValue* default_sites_list = new ListValue; | 2087 ListValue* default_sites_list = new ListValue; |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2650 void DragTargetDropAckNotificationObserver::Observe( | 2661 void DragTargetDropAckNotificationObserver::Observe( |
| 2651 int type, | 2662 int type, |
| 2652 const NotificationSource& source, | 2663 const NotificationSource& source, |
| 2653 const NotificationDetails& details) { | 2664 const NotificationDetails& details) { |
| 2654 if (automation_) { | 2665 if (automation_) { |
| 2655 AutomationJSONReply(automation_, | 2666 AutomationJSONReply(automation_, |
| 2656 reply_message_.release()).SendSuccess(NULL); | 2667 reply_message_.release()).SendSuccess(NULL); |
| 2657 } | 2668 } |
| 2658 delete this; | 2669 delete this; |
| 2659 } | 2670 } |
| OLD | NEW |