diff options
author | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 02:31:40 +0000 |
---|---|---|
committer | fsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 02:31:40 +0000 |
commit | a97472a4d37cd0fae0fea068fc695cd886d0e6f1 (patch) | |
tree | 8fd3a2a7182465094f3fb40e6132178024cfd20b /extensions/common/event_matcher.cc | |
parent | 5a9e5cfdd75a2f5f994687395ce34ae5d0154e24 (diff) | |
download | chromium_src-a97472a4d37cd0fae0fea068fc695cd886d0e6f1.zip chromium_src-a97472a4d37cd0fae0fea068fc695cd886d0e6f1.tar.gz chromium_src-a97472a4d37cd0fae0fea068fc695cd886d0e6f1.tar.bz2 |
<webview>: Don't attempt to dispatch events to all app windows.
This CL associates a routingId with each event listener. This ensures that when dispatching events from the browser process, only event listeners associated with the current RenderView are fired.
BUG=166165
Test=manually by opening a two Chrome app windows in the same app with webviews
Verify that there is no error spew in either console output.
Review URL: https://chromiumcodereview.appspot.com/18858005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/event_matcher.cc')
-rw-r--r-- | extensions/common/event_matcher.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/extensions/common/event_matcher.cc b/extensions/common/event_matcher.cc index 937c783..ad76c89 100644 --- a/extensions/common/event_matcher.cc +++ b/extensions/common/event_matcher.cc @@ -12,8 +12,10 @@ const char kUrlFiltersKey[] = "url"; namespace extensions { -EventMatcher::EventMatcher(scoped_ptr<base::DictionaryValue> filter) - : filter_(filter.Pass()) { +EventMatcher::EventMatcher(scoped_ptr<base::DictionaryValue> filter, + int routing_id) + : filter_(filter.Pass()), + routing_id_(routing_id) { } EventMatcher::~EventMatcher() { @@ -23,6 +25,7 @@ bool EventMatcher::MatchNonURLCriteria( const EventFilteringInfo& event_info) const { if (!event_info.has_instance_id()) return true; + return event_info.instance_id() == GetInstanceID(); } @@ -51,4 +54,8 @@ int EventMatcher::GetInstanceID() const { return instance_id; } +int EventMatcher::GetRoutingID() const { + return routing_id_; +} + } // namespace extensions |