| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h" | 5 #include "extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" |
| 7 #include "extensions/browser/api/socket/udp_socket.h" | 8 #include "extensions/browser/api/socket/udp_socket.h" |
| 8 #include "extensions/browser/event_router.h" | 9 #include "extensions/browser/event_router.h" |
| 9 #include "extensions/browser/extensions_browser_client.h" | 10 #include "extensions/browser/extensions_browser_client.h" |
| 10 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 11 | 12 |
| 12 namespace extensions { | 13 namespace extensions { |
| 13 namespace core_api { | 14 namespace core_api { |
| 14 | 15 |
| 15 using content::BrowserThread; | 16 using content::BrowserThread; |
| 16 | 17 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 reinterpret_cast<content::BrowserContext*>(browser_context_id); | 174 reinterpret_cast<content::BrowserContext*>(browser_context_id); |
| 174 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context)) | 175 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context)) |
| 175 return; | 176 return; |
| 176 EventRouter* router = EventRouter::Get(context); | 177 EventRouter* router = EventRouter::Get(context); |
| 177 if (router) | 178 if (router) |
| 178 router->DispatchEventToExtension(extension_id, event.Pass()); | 179 router->DispatchEventToExtension(extension_id, event.Pass()); |
| 179 } | 180 } |
| 180 | 181 |
| 181 } // namespace core_api | 182 } // namespace core_api |
| 182 } // namespace extensions | 183 } // namespace extensions |
| OLD | NEW |