| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/api/cast_channel/cast_channel_api.h" | 5 #include "chrome/browser/extensions/api/cast_channel/cast_channel_api.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" | 11 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" |
| 12 #include "chrome/browser/extensions/extension_system.h" | |
| 13 #include "chrome/browser/net/chrome_net_log.h" | 12 #include "chrome/browser/net/chrome_net_log.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 16 #include "extensions/browser/event_router.h" | 15 #include "extensions/browser/event_router.h" |
| 16 #include "extensions/browser/extension_system.h" |
| 17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 19 | 19 |
| 20 namespace extensions { | 20 namespace extensions { |
| 21 | 21 |
| 22 namespace Close = cast_channel::Close; | 22 namespace Close = cast_channel::Close; |
| 23 namespace OnError = cast_channel::OnError; | 23 namespace OnError = cast_channel::OnError; |
| 24 namespace OnMessage = cast_channel::OnMessage; | 24 namespace OnMessage = cast_channel::OnMessage; |
| 25 namespace Open = cast_channel::Open; | 25 namespace Open = cast_channel::Open; |
| 26 namespace Send = cast_channel::Send; | 26 namespace Send = cast_channel::Send; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 SetResultFromError(cast_channel::CHANNEL_ERROR_SOCKET_ERROR); | 263 SetResultFromError(cast_channel::CHANNEL_ERROR_SOCKET_ERROR); |
| 264 } else { | 264 } else { |
| 265 int channel_id = params_->channel.channel_id; | 265 int channel_id = params_->channel.channel_id; |
| 266 SetResultFromSocket(channel_id); | 266 SetResultFromSocket(channel_id); |
| 267 RemoveSocket(channel_id); | 267 RemoveSocket(channel_id); |
| 268 } | 268 } |
| 269 AsyncWorkCompleted(); | 269 AsyncWorkCompleted(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace extensions | 272 } // namespace extensions |
| OLD | NEW |