| 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 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2035 terminated_extensions, ext_service); | 2035 terminated_extensions, ext_service); |
| 2036 for (std::vector<DictionaryValue*>::const_iterator app = | 2036 for (std::vector<DictionaryValue*>::const_iterator app = |
| 2037 terminated_apps->begin(); app != terminated_apps->end(); ++app) { | 2037 terminated_apps->begin(); app != terminated_apps->end(); ++app) { |
| 2038 (*app)->SetBoolean("is_disabled", true); | 2038 (*app)->SetBoolean("is_disabled", true); |
| 2039 apps_list->Append(*app); | 2039 apps_list->Append(*app); |
| 2040 } | 2040 } |
| 2041 delete terminated_apps; | 2041 delete terminated_apps; |
| 2042 ntp_info_->Set("apps", apps_list); | 2042 ntp_info_->Set("apps", apps_list); |
| 2043 | 2043 |
| 2044 // Get the info that would be displayed in the recently closed section. | 2044 // Get the info that would be displayed in the recently closed section. |
| 2045 TabRestoreService::Entries entries; |
| 2046 service->FilteredEntries(&entries); |
| 2045 ListValue* recently_closed_list = new ListValue; | 2047 ListValue* recently_closed_list = new ListValue; |
| 2046 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(service->entries(), | 2048 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(entries, |
| 2047 recently_closed_list); | 2049 recently_closed_list); |
| 2048 ntp_info_->Set("recently_closed", recently_closed_list); | 2050 ntp_info_->Set("recently_closed", recently_closed_list); |
| 2049 | 2051 |
| 2050 // Add default site URLs. | 2052 // Add default site URLs. |
| 2051 ListValue* default_sites_list = new ListValue; | 2053 ListValue* default_sites_list = new ListValue; |
| 2052 history::MostVisitedURLList urls = history::TopSites::GetPrepopulatePages(); | 2054 history::MostVisitedURLList urls = history::TopSites::GetPrepopulatePages(); |
| 2053 for (size_t i = 0; i < urls.size(); ++i) { | 2055 for (size_t i = 0; i < urls.size(); ++i) { |
| 2054 default_sites_list->Append(Value::CreateStringValue( | 2056 default_sites_list->Append(Value::CreateStringValue( |
| 2055 urls[i].url.possibly_invalid_spec())); | 2057 urls[i].url.possibly_invalid_spec())); |
| 2056 } | 2058 } |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2700 void DragTargetDropAckNotificationObserver::Observe( | 2702 void DragTargetDropAckNotificationObserver::Observe( |
| 2701 int type, | 2703 int type, |
| 2702 const NotificationSource& source, | 2704 const NotificationSource& source, |
| 2703 const NotificationDetails& details) { | 2705 const NotificationDetails& details) { |
| 2704 if (automation_) { | 2706 if (automation_) { |
| 2705 AutomationJSONReply(automation_, | 2707 AutomationJSONReply(automation_, |
| 2706 reply_message_.release()).SendSuccess(NULL); | 2708 reply_message_.release()).SendSuccess(NULL); |
| 2707 } | 2709 } |
| 2708 delete this; | 2710 delete this; |
| 2709 } | 2711 } |
| OLD | NEW |