Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/history/history_extension_api.cc

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, reland Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/system/system_api.cc ('k') | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698