| 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 28 matching lines...) Expand all Loading... |
| 39 #include "chrome/browser/notifications/balloon_collection.h" | 39 #include "chrome/browser/notifications/balloon_collection.h" |
| 40 #include "chrome/browser/notifications/balloon_host.h" | 40 #include "chrome/browser/notifications/balloon_host.h" |
| 41 #include "chrome/browser/notifications/notification.h" | 41 #include "chrome/browser/notifications/notification.h" |
| 42 #include "chrome/browser/notifications/notification_ui_manager.h" | 42 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 43 #include "chrome/browser/password_manager/password_store_change.h" | 43 #include "chrome/browser/password_manager/password_store_change.h" |
| 44 #include "chrome/browser/printing/print_job.h" | 44 #include "chrome/browser/printing/print_job.h" |
| 45 #include "chrome/browser/profiles/profile.h" | 45 #include "chrome/browser/profiles/profile.h" |
| 46 #include "chrome/browser/search_engines/template_url_service.h" | 46 #include "chrome/browser/search_engines/template_url_service.h" |
| 47 #include "chrome/browser/search_engines/template_url_service_factory.h" | 47 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 48 #include "chrome/browser/sessions/restore_tab_helper.h" | 48 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 49 #include "chrome/browser/sessions/session_utils.h" |
| 49 #include "chrome/browser/sessions/tab_restore_service.h" | 50 #include "chrome/browser/sessions/tab_restore_service.h" |
| 50 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 51 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 51 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 52 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| 52 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 53 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 53 #include "chrome/browser/translate/page_translated_details.h" | 54 #include "chrome/browser/translate/page_translated_details.h" |
| 54 #include "chrome/browser/translate/translate_infobar_delegate.h" | 55 #include "chrome/browser/translate/translate_infobar_delegate.h" |
| 55 #include "chrome/browser/translate/translate_tab_helper.h" | 56 #include "chrome/browser/translate/translate_tab_helper.h" |
| 56 #include "chrome/browser/ui/browser.h" | 57 #include "chrome/browser/ui/browser.h" |
| 57 #include "chrome/browser/ui/browser_list.h" | 58 #include "chrome/browser/ui/browser_list.h" |
| 58 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 59 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| (...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2035 terminated_extensions, ext_service); | 2036 terminated_extensions, ext_service); |
| 2036 for (std::vector<DictionaryValue*>::const_iterator app = | 2037 for (std::vector<DictionaryValue*>::const_iterator app = |
| 2037 terminated_apps->begin(); app != terminated_apps->end(); ++app) { | 2038 terminated_apps->begin(); app != terminated_apps->end(); ++app) { |
| 2038 (*app)->SetBoolean("is_disabled", true); | 2039 (*app)->SetBoolean("is_disabled", true); |
| 2039 apps_list->Append(*app); | 2040 apps_list->Append(*app); |
| 2040 } | 2041 } |
| 2041 delete terminated_apps; | 2042 delete terminated_apps; |
| 2042 ntp_info_->Set("apps", apps_list); | 2043 ntp_info_->Set("apps", apps_list); |
| 2043 | 2044 |
| 2044 // Get the info that would be displayed in the recently closed section. | 2045 // Get the info that would be displayed in the recently closed section. |
| 2046 TabRestoreService::Entries entries; |
| 2047 SessionUtils::FilteredEntries(service->entries(), &entries); |
| 2045 ListValue* recently_closed_list = new ListValue; | 2048 ListValue* recently_closed_list = new ListValue; |
| 2046 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(service->entries(), | 2049 RecentlyClosedTabsHandler::AddRecentlyClosedEntries(entries, |
| 2047 recently_closed_list); | 2050 recently_closed_list); |
| 2048 ntp_info_->Set("recently_closed", recently_closed_list); | 2051 ntp_info_->Set("recently_closed", recently_closed_list); |
| 2049 | 2052 |
| 2050 // Add default site URLs. | 2053 // Add default site URLs. |
| 2051 ListValue* default_sites_list = new ListValue; | 2054 ListValue* default_sites_list = new ListValue; |
| 2052 history::MostVisitedURLList urls = history::TopSites::GetPrepopulatePages(); | 2055 history::MostVisitedURLList urls = history::TopSites::GetPrepopulatePages(); |
| 2053 for (size_t i = 0; i < urls.size(); ++i) { | 2056 for (size_t i = 0; i < urls.size(); ++i) { |
| 2054 default_sites_list->Append(Value::CreateStringValue( | 2057 default_sites_list->Append(Value::CreateStringValue( |
| 2055 urls[i].url.possibly_invalid_spec())); | 2058 urls[i].url.possibly_invalid_spec())); |
| 2056 } | 2059 } |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2700 void DragTargetDropAckNotificationObserver::Observe( | 2703 void DragTargetDropAckNotificationObserver::Observe( |
| 2701 int type, | 2704 int type, |
| 2702 const NotificationSource& source, | 2705 const NotificationSource& source, |
| 2703 const NotificationDetails& details) { | 2706 const NotificationDetails& details) { |
| 2704 if (automation_) { | 2707 if (automation_) { |
| 2705 AutomationJSONReply(automation_, | 2708 AutomationJSONReply(automation_, |
| 2706 reply_message_.release()).SendSuccess(NULL); | 2709 reply_message_.release()).SendSuccess(NULL); |
| 2707 } | 2710 } |
| 2708 delete this; | 2711 delete this; |
| 2709 } | 2712 } |
| OLD | NEW |