| 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 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 } | 2133 } |
| 2134 | 2134 |
| 2135 ListValue* list_value = new ListValue; | 2135 ListValue* list_value = new ListValue; |
| 2136 for (size_t i = 0; i < visited_list.size(); ++i) { | 2136 for (size_t i = 0; i < visited_list.size(); ++i) { |
| 2137 const history::MostVisitedURL& visited = visited_list[i]; | 2137 const history::MostVisitedURL& visited = visited_list[i]; |
| 2138 if (visited.url.spec().empty()) | 2138 if (visited.url.spec().empty()) |
| 2139 break; // This is the signal that there are no more real visited sites. | 2139 break; // This is the signal that there are no more real visited sites. |
| 2140 DictionaryValue* dict = new DictionaryValue; | 2140 DictionaryValue* dict = new DictionaryValue; |
| 2141 dict->SetString("url", visited.url.spec()); | 2141 dict->SetString("url", visited.url.spec()); |
| 2142 dict->SetString("title", visited.title); | 2142 dict->SetString("title", visited.title); |
| 2143 dict->SetBoolean("is_pinned", top_sites_->IsURLPinned(visited.url)); | |
| 2144 list_value->Append(dict); | 2143 list_value->Append(dict); |
| 2145 } | 2144 } |
| 2146 ntp_info_->Set("most_visited", list_value); | 2145 ntp_info_->Set("most_visited", list_value); |
| 2147 AutomationJSONReply(automation_, | 2146 AutomationJSONReply(automation_, |
| 2148 reply_message_.release()).SendSuccess(ntp_info_.get()); | 2147 reply_message_.release()).SendSuccess(ntp_info_.get()); |
| 2149 delete this; | 2148 delete this; |
| 2150 } | 2149 } |
| 2151 | 2150 |
| 2152 AppLaunchObserver::AppLaunchObserver( | 2151 AppLaunchObserver::AppLaunchObserver( |
| 2153 NavigationController* controller, | 2152 NavigationController* controller, |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3141 } | 3140 } |
| 3142 | 3141 |
| 3143 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3142 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3144 if (host->extension_id() == extension_id_ && | 3143 if (host->extension_id() == extension_id_ && |
| 3145 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3144 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3146 AutomationJSONReply(automation_, reply_message_.release()) | 3145 AutomationJSONReply(automation_, reply_message_.release()) |
| 3147 .SendSuccess(NULL); | 3146 .SendSuccess(NULL); |
| 3148 delete this; | 3147 delete this; |
| 3149 } | 3148 } |
| 3150 } | 3149 } |
| OLD | NEW |