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

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

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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
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/event_router.h" 5 #include "chrome/browser/extensions/event_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 const std::string& event_name, 123 const std::string& event_name,
124 ListValue* event_args, 124 ListValue* event_args,
125 UserGestureState user_gesture, 125 UserGestureState user_gesture,
126 const EventFilteringInfo& info) { 126 const EventFilteringInfo& info) {
127 if (ActivityLog::IsLogEnabledOnAnyProfile()) { 127 if (ActivityLog::IsLogEnabledOnAnyProfile()) {
128 LogExtensionEventMessage(profile_id, extension_id, event_name, 128 LogExtensionEventMessage(profile_id, extension_id, event_name,
129 scoped_ptr<ListValue>(event_args->DeepCopy())); 129 scoped_ptr<ListValue>(event_args->DeepCopy()));
130 } 130 }
131 131
132 ListValue args; 132 ListValue args;
133 args.Set(0, Value::CreateStringValue(event_name)); 133 args.Set(0, new base::StringValue(event_name));
134 args.Set(1, event_args); 134 args.Set(1, event_args);
135 args.Set(2, info.AsValue().release()); 135 args.Set(2, info.AsValue().release());
136 ipc_sender->Send(new ExtensionMsg_MessageInvoke( 136 ipc_sender->Send(new ExtensionMsg_MessageInvoke(
137 MSG_ROUTING_CONTROL, 137 MSG_ROUTING_CONTROL,
138 extension_id, 138 extension_id,
139 "event_bindings", 139 "event_bindings",
140 "dispatchEvent", 140 "dispatchEvent",
141 args, 141 args,
142 user_gesture == USER_GESTURE_ENABLED)); 142 user_gesture == USER_GESTURE_ENABLED));
143 143
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 copy->will_dispatch_callback = will_dispatch_callback; 861 copy->will_dispatch_callback = will_dispatch_callback;
862 return copy; 862 return copy;
863 } 863 }
864 864
865 EventListenerInfo::EventListenerInfo(const std::string& event_name, 865 EventListenerInfo::EventListenerInfo(const std::string& event_name,
866 const std::string& extension_id) 866 const std::string& extension_id)
867 : event_name(event_name), 867 : event_name(event_name),
868 extension_id(extension_id) {} 868 extension_id(extension_id) {}
869 869
870 } // namespace extensions 870 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/convert_web_app.cc ('k') | chrome/browser/extensions/extension_keybinding_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698