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

Side by Side Diff: chrome/browser/extensions/extension_processes_api.cc

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split out event_filter changes Created 8 years, 6 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/extensions/extension_processes_api.h" 5 #include "chrome/browser/extensions/extension_processes_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 NotifyProfiles(keys::kOnExited, json_args); 482 NotifyProfiles(keys::kOnExited, json_args);
483 #endif // defined(ENABLE_TASK_MANAGER) 483 #endif // defined(ENABLE_TASK_MANAGER)
484 } 484 }
485 485
486 void ExtensionProcessesEventRouter::DispatchEvent( 486 void ExtensionProcessesEventRouter::DispatchEvent(
487 Profile* profile, 487 Profile* profile,
488 const char* event_name, 488 const char* event_name,
489 const std::string& json_args) { 489 const std::string& json_args) {
490 if (profile && profile->GetExtensionEventRouter()) { 490 if (profile && profile->GetExtensionEventRouter()) {
491 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 491 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
492 event_name, json_args, NULL, GURL()); 492 event_name, json_args, NULL, GURL(), EventFilteringInfo());
493 } 493 }
494 } 494 }
495 495
496 void ExtensionProcessesEventRouter::NotifyProfiles(const char* event_name, 496 void ExtensionProcessesEventRouter::NotifyProfiles(const char* event_name,
497 std::string json_args) { 497 std::string json_args) {
498 for (ProfileSet::iterator it = profiles_.begin(); 498 for (ProfileSet::iterator it = profiles_.begin();
499 it != profiles_.end(); it++) { 499 it != profiles_.end(); it++) {
500 Profile* profile = *it; 500 Profile* profile = *it;
501 DispatchEvent(profile, event_name, json_args); 501 DispatchEvent(profile, event_name, json_args);
502 } 502 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 } 745 }
746 DCHECK(process_ids_.size() == 0); 746 DCHECK(process_ids_.size() == 0);
747 } 747 }
748 748
749 result_.reset(processes); 749 result_.reset(processes);
750 SendResponse(true); 750 SendResponse(true);
751 751
752 // Balance the AddRef in the RunImpl. 752 // Balance the AddRef in the RunImpl.
753 Release(); 753 Release();
754 } 754 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698