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

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

Issue 11440004: Remove deprecated extension EventRouter APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 years 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/window_event_router.h" 5 #include "chrome/browser/extensions/window_event_router.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/extensions/event_names.h" 8 #include "chrome/browser/extensions/event_names.h"
9 #include "chrome/browser/extensions/event_router.h" 9 #include "chrome/browser/extensions/event_router.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 scoped_ptr<Event> event(new Event(event_names::kOnWindowFocusedChanged, 142 scoped_ptr<Event> event(new Event(event_names::kOnWindowFocusedChanged,
143 real_args.Pass())); 143 real_args.Pass()));
144 event->restrict_to_profile = window_profile; 144 event->restrict_to_profile = window_profile;
145 event->cross_incognito_args = cross_incognito_args.Pass(); 145 event->cross_incognito_args = cross_incognito_args.Pass();
146 ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent(event.Pass()); 146 ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent(event.Pass());
147 } 147 }
148 148
149 void WindowEventRouter::DispatchEvent(const char* event_name, 149 void WindowEventRouter::DispatchEvent(const char* event_name,
150 Profile* profile, 150 Profile* profile,
151 scoped_ptr<base::ListValue> args) { 151 scoped_ptr<base::ListValue> args) {
152 ExtensionSystem::Get(profile)->event_router()-> 152 scoped_ptr<Event> event(new Event(event_name, args.Pass()));
153 DispatchEventToRenderers(event_name, args.Pass(), profile, GURL()); 153 event->restrict_to_profile = profile;
154 ExtensionSystem::Get(profile)->event_router()->BroadcastEvent(event.Pass());
154 } 155 }
155 156
156 } // namespace extensions 157 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings/settings_frontend.cc ('k') | chrome/browser/history/history_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698