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

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

Issue 10661038: Revert 143896 - Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Property Changes:
Added: svn:mergeinfo
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_browser_event_router.h" 5 #include "chrome/browser/extensions/extension_browser_event_router.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api_constants.h" 9 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api_constants.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 DispatchTabUpdatedEvent(contents, changed_properties); 444 DispatchTabUpdatedEvent(contents, changed_properties);
445 } 445 }
446 446
447 void ExtensionBrowserEventRouter::DispatchEvent(Profile* profile, 447 void ExtensionBrowserEventRouter::DispatchEvent(Profile* profile,
448 const char* event_name, 448 const char* event_name,
449 const std::string& json_args) { 449 const std::string& json_args) {
450 if (!profile_->IsSameProfile(profile) || !profile->GetExtensionEventRouter()) 450 if (!profile_->IsSameProfile(profile) || !profile->GetExtensionEventRouter())
451 return; 451 return;
452 452
453 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 453 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
454 event_name, json_args, profile, GURL(), extensions::EventFilteringInfo()); 454 event_name, json_args, profile, GURL());
455 } 455 }
456 456
457 void ExtensionBrowserEventRouter::DispatchEventToExtension( 457 void ExtensionBrowserEventRouter::DispatchEventToExtension(
458 Profile* profile, 458 Profile* profile,
459 const std::string& extension_id, 459 const std::string& extension_id,
460 const char* event_name, 460 const char* event_name,
461 const std::string& json_args) { 461 const std::string& json_args) {
462 if (!profile_->IsSameProfile(profile) || !profile->GetExtensionEventRouter()) 462 if (!profile_->IsSameProfile(profile) || !profile->GetExtensionEventRouter())
463 return; 463 return;
464 464
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 688 }
689 689
690 if (event_name) { 690 if (event_name) {
691 DispatchEventWithTab(profile, 691 DispatchEventWithTab(profile,
692 extension_action.extension_id(), 692 extension_action.extension_id(),
693 event_name, 693 event_name,
694 tab_contents->web_contents(), 694 tab_contents->web_contents(),
695 true); 695 true);
696 } 696 }
697 } 697 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_listener_map_unittest.cc ('k') | chrome/browser/extensions/extension_devtools_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698