| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 13 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" | |
| 14 #include "chrome/common/extensions/api/cast_channel.h" | |
| 15 #include "extensions/browser/api/api_resource_manager.h" | 13 #include "extensions/browser/api/api_resource_manager.h" |
| 16 #include "extensions/browser/api/async_api_function.h" | 14 #include "extensions/browser/api/async_api_function.h" |
| 15 #include "extensions/browser/api/cast_channel/cast_socket.h" |
| 17 #include "extensions/browser/browser_context_keyed_api_factory.h" | 16 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 17 #include "extensions/common/api/cast_channel.h" |
| 18 | 18 |
| 19 class GURL; | 19 class GURL; |
| 20 class CastChannelAPITest; | 20 class CastChannelAPITest; |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 class BrowserContext; | 23 class BrowserContext; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 class IPEndPoint; | 27 class IPEndPoint; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace extensions { | 30 namespace extensions { |
| 31 | 31 |
| 32 namespace cast_channel = api::cast_channel; | 32 namespace cast_channel = core_api::cast_channel; |
| 33 | 33 |
| 34 class CastChannelAPI : public BrowserContextKeyedAPI, | 34 class CastChannelAPI : public BrowserContextKeyedAPI, |
| 35 public cast_channel::CastSocket::Delegate { | 35 public cast_channel::CastSocket::Delegate { |
| 36 public: | 36 public: |
| 37 explicit CastChannelAPI(content::BrowserContext* context); | 37 explicit CastChannelAPI(content::BrowserContext* context); |
| 38 | 38 |
| 39 static CastChannelAPI* Get(content::BrowserContext* context); | 39 static CastChannelAPI* Get(content::BrowserContext* context); |
| 40 | 40 |
| 41 // BrowserContextKeyedAPI implementation. | 41 // BrowserContextKeyedAPI implementation. |
| 42 static BrowserContextKeyedAPIFactory<CastChannelAPI>* GetFactoryInstance(); | 42 static BrowserContextKeyedAPIFactory<CastChannelAPI>* GetFactoryInstance(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 void OnClose(int result); | 199 void OnClose(int result); |
| 200 | 200 |
| 201 scoped_ptr<cast_channel::Close::Params> params_; | 201 scoped_ptr<cast_channel::Close::Params> params_; |
| 202 | 202 |
| 203 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); | 203 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 } // namespace extensions | 206 } // namespace extensions |
| 207 | 207 |
| 208 #endif // CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 208 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| OLD | NEW |