| Index: extensions/browser/api/socket/socket_api.h
|
| diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/extensions/browser/api/socket/socket_api.h
|
| similarity index 92%
|
| rename from chrome/browser/extensions/api/socket/socket_api.h
|
| rename to extensions/browser/api/socket/socket_api.h
|
| index 172f3a48341224322865514ab8b479cf6a02d0d4..085dfbe24b7a4e658cdf5c58895b79eb3017caf1 100644
|
| --- a/chrome/browser/extensions/api/socket/socket_api.h
|
| +++ b/extensions/browser/api/socket/socket_api.h
|
| @@ -2,21 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
|
| +#ifndef EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_
|
| +#define EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_
|
| +
|
| +#include <string>
|
|
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "chrome/common/extensions/api/socket.h"
|
| #include "extensions/browser/api/api_resource_manager.h"
|
| #include "extensions/browser/api/async_api_function.h"
|
| #include "extensions/browser/extension_function.h"
|
| +#include "extensions/common/api/socket.h"
|
| #include "net/base/address_list.h"
|
| #include "net/dns/host_resolver.h"
|
| #include "net/socket/tcp_client_socket.h"
|
|
|
| -#include <string>
|
| -
|
| namespace content {
|
| class BrowserContext;
|
| class ResourceContext;
|
| @@ -150,7 +150,7 @@ class SocketCreateFunction : public SocketAsyncApiFunction {
|
| FRIEND_TEST_ALL_PREFIXES(SocketUnitTest, Create);
|
| enum SocketType { kSocketTypeInvalid = -1, kSocketTypeTCP, kSocketTypeUDP };
|
|
|
| - scoped_ptr<api::socket::Create::Params> params_;
|
| + scoped_ptr<core_api::socket::Create::Params> params_;
|
| SocketType socket_type_;
|
| };
|
|
|
| @@ -241,7 +241,7 @@ class SocketListenFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::Listen::Params> params_;
|
| + scoped_ptr<core_api::socket::Listen::Params> params_;
|
| };
|
|
|
| class SocketAcceptFunction : public SocketAsyncApiFunction {
|
| @@ -259,7 +259,8 @@ class SocketAcceptFunction : public SocketAsyncApiFunction {
|
|
|
| private:
|
| void OnAccept(int result_code, net::TCPClientSocket* socket);
|
| - scoped_ptr<api::socket::Accept::Params> params_;
|
| +
|
| + scoped_ptr<core_api::socket::Accept::Params> params_;
|
| };
|
|
|
| class SocketReadFunction : public SocketAsyncApiFunction {
|
| @@ -277,7 +278,7 @@ class SocketReadFunction : public SocketAsyncApiFunction {
|
| void OnCompleted(int result, scoped_refptr<net::IOBuffer> io_buffer);
|
|
|
| private:
|
| - scoped_ptr<api::socket::Read::Params> params_;
|
| + scoped_ptr<core_api::socket::Read::Params> params_;
|
| };
|
|
|
| class SocketWriteFunction : public SocketAsyncApiFunction {
|
| @@ -318,7 +319,7 @@ class SocketRecvFromFunction : public SocketAsyncApiFunction {
|
| int port);
|
|
|
| private:
|
| - scoped_ptr<api::socket::RecvFrom::Params> params_;
|
| + scoped_ptr<core_api::socket::RecvFrom::Params> params_;
|
| };
|
|
|
| class SocketSendToFunction : public SocketExtensionWithDnsLookupFunction {
|
| @@ -363,7 +364,7 @@ class SocketSetKeepAliveFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::SetKeepAlive::Params> params_;
|
| + scoped_ptr<core_api::socket::SetKeepAlive::Params> params_;
|
| };
|
|
|
| class SocketSetNoDelayFunction : public SocketAsyncApiFunction {
|
| @@ -380,7 +381,7 @@ class SocketSetNoDelayFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::SetNoDelay::Params> params_;
|
| + scoped_ptr<core_api::socket::SetNoDelay::Params> params_;
|
| };
|
|
|
| class SocketGetInfoFunction : public SocketAsyncApiFunction {
|
| @@ -397,7 +398,7 @@ class SocketGetInfoFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::GetInfo::Params> params_;
|
| + scoped_ptr<core_api::socket::GetInfo::Params> params_;
|
| };
|
|
|
| class SocketGetNetworkListFunction : public AsyncExtensionFunction {
|
| @@ -428,7 +429,7 @@ class SocketJoinGroupFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::JoinGroup::Params> params_;
|
| + scoped_ptr<core_api::socket::JoinGroup::Params> params_;
|
| };
|
|
|
| class SocketLeaveGroupFunction : public SocketAsyncApiFunction {
|
| @@ -445,7 +446,7 @@ class SocketLeaveGroupFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::LeaveGroup::Params> params_;
|
| + scoped_ptr<core_api::socket::LeaveGroup::Params> params_;
|
| };
|
|
|
| class SocketSetMulticastTimeToLiveFunction : public SocketAsyncApiFunction {
|
| @@ -463,7 +464,7 @@ class SocketSetMulticastTimeToLiveFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::SetMulticastTimeToLive::Params> params_;
|
| + scoped_ptr<core_api::socket::SetMulticastTimeToLive::Params> params_;
|
| };
|
|
|
| class SocketSetMulticastLoopbackModeFunction : public SocketAsyncApiFunction {
|
| @@ -481,7 +482,7 @@ class SocketSetMulticastLoopbackModeFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::SetMulticastLoopbackMode::Params> params_;
|
| + scoped_ptr<core_api::socket::SetMulticastLoopbackMode::Params> params_;
|
| };
|
|
|
| class SocketGetJoinedGroupsFunction : public SocketAsyncApiFunction {
|
| @@ -499,8 +500,8 @@ class SocketGetJoinedGroupsFunction : public SocketAsyncApiFunction {
|
| virtual void Work() OVERRIDE;
|
|
|
| private:
|
| - scoped_ptr<api::socket::GetJoinedGroups::Params> params_;
|
| + scoped_ptr<core_api::socket::GetJoinedGroups::Params> params_;
|
| };
|
| } // namespace extensions
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
|
| +#endif // EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_
|
|
|