| OLD | NEW | 
|    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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  117 } |  117 } | 
|  118  |  118  | 
|  119 // static |  119 // static | 
|  120 void EventRouter::DispatchExtensionMessage(IPC::Sender* ipc_sender, |  120 void EventRouter::DispatchExtensionMessage(IPC::Sender* ipc_sender, | 
|  121                                            void* profile_id, |  121                                            void* profile_id, | 
|  122                                            const std::string& extension_id, |  122                                            const std::string& extension_id, | 
|  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::MaybeLogEnabled()) { | 
|  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, Value::CreateStringValue(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, | 
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  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 | 
| OLD | NEW |