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/history/history_extension_api.h" | 5 #include "chrome/browser/history/history_extension_api.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 std::string json_args; | 156 std::string json_args; |
157 base::JSONWriter::Write(&args, &json_args); | 157 base::JSONWriter::Write(&args, &json_args); |
158 DispatchEvent(profile, kOnVisitRemoved, json_args); | 158 DispatchEvent(profile, kOnVisitRemoved, json_args); |
159 } | 159 } |
160 | 160 |
161 void HistoryExtensionEventRouter::DispatchEvent(Profile* profile, | 161 void HistoryExtensionEventRouter::DispatchEvent(Profile* profile, |
162 const char* event_name, | 162 const char* event_name, |
163 const std::string& json_args) { | 163 const std::string& json_args) { |
164 if (profile && profile->GetExtensionEventRouter()) { | 164 if (profile && profile->GetExtensionEventRouter()) { |
165 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 165 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
166 event_name, json_args, profile, GURL()); | 166 event_name, json_args, profile, GURL(), |
| 167 extensions::EventFilteringInfo()); |
167 } | 168 } |
168 } | 169 } |
169 | 170 |
170 void HistoryFunction::Run() { | 171 void HistoryFunction::Run() { |
171 if (!RunImpl()) { | 172 if (!RunImpl()) { |
172 SendResponse(false); | 173 SendResponse(false); |
173 } | 174 } |
174 } | 175 } |
175 | 176 |
176 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) { | 177 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) { |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 &cancelable_consumer_, | 406 &cancelable_consumer_, |
406 base::Bind(&DeleteAllHistoryFunction::DeleteComplete, | 407 base::Bind(&DeleteAllHistoryFunction::DeleteComplete, |
407 base::Unretained(this))); | 408 base::Unretained(this))); |
408 | 409 |
409 return true; | 410 return true; |
410 } | 411 } |
411 | 412 |
412 void DeleteAllHistoryFunction::DeleteComplete() { | 413 void DeleteAllHistoryFunction::DeleteComplete() { |
413 SendAsyncResponse(); | 414 SendAsyncResponse(); |
414 } | 415 } |
OLD | NEW |