summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 18:13:59 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 18:13:59 +0000
commitc7f2ef7cee78dffc7fceea096ea482750b31fad1 (patch)
tree15662e81be035d101fed9e17ef16c56d0348c366 /remoting/client
parenta44c107ff7f62d2ba682b504345287ad244b695b (diff)
downloadchromium_src-c7f2ef7cee78dffc7fceea096ea482750b31fad1.zip
chromium_src-c7f2ef7cee78dffc7fceea096ea482750b31fad1.tar.gz
chromium_src-c7f2ef7cee78dffc7fceea096ea482750b31fad1.tar.bz2
Cleanup ConnectionToHost of non-P2P-API code.
BUG=74951 TEST=Compiles Review URL: http://codereview.chromium.org/7981026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/DEPS4
-rw-r--r--remoting/client/ipc_host_resolver.cc70
-rw-r--r--remoting/client/ipc_host_resolver.h37
-rw-r--r--remoting/client/plugin/chromoting_instance.cc16
-rw-r--r--remoting/client/plugin/chromoting_instance.h8
5 files changed, 5 insertions, 130 deletions
diff --git a/remoting/client/DEPS b/remoting/client/DEPS
index 2a3269f..e50aa3e 100644
--- a/remoting/client/DEPS
+++ b/remoting/client/DEPS
@@ -6,8 +6,4 @@ include_rules = [
"+remoting/protocol",
"+remoting/jingle_glue",
-
- # TODO(sergeyu): Remove this dependency: crbug.com/74951 .
- "+webkit/plugins/ppapi",
- "+content/renderer/p2p",
]
diff --git a/remoting/client/ipc_host_resolver.cc b/remoting/client/ipc_host_resolver.cc
deleted file mode 100644
index ea8a0a8..0000000
--- a/remoting/client/ipc_host_resolver.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "remoting/client/ipc_host_resolver.h"
-
-#include "base/bind.h"
-#include "content/renderer/p2p/host_address_request.h"
-#include "content/renderer/p2p/socket_dispatcher.h"
-#include "net/base/ip_endpoint.h"
-#include "jingle/glue/utils.h"
-
-namespace remoting {
-
-class IpcHostResolver : public HostResolver {
- public:
- IpcHostResolver(content::P2PSocketDispatcher* socket_dispatcher)
- : socket_dispatcher_(socket_dispatcher),
- port_(0) {
- }
-
- virtual ~IpcHostResolver() {
- if (request_)
- request_->Cancel();
- }
-
- virtual void Resolve(const talk_base::SocketAddress& address) OVERRIDE {
- if (address.IsUnresolved()) {
- port_ = address.port();
- request_ = new content::P2PHostAddressRequest(socket_dispatcher_);
- request_->Request(address.hostname(), base::Bind(
- &IpcHostResolver::OnDone, base::Unretained(this)));
- } else {
- SignalDone(this, address);
- }
- }
-
- private:
- void OnDone(const net::IPAddressNumber& address) {
- talk_base::SocketAddress socket_address;
- if (address.empty() ||
- !jingle_glue::IPEndPointToSocketAddress(
- net::IPEndPoint(address, port_), &socket_address)) {
- // Return nil address if the request has failed.
- SignalDone(this, talk_base::SocketAddress());
- return;
- }
-
- request_ = NULL;
- SignalDone(this, socket_address);
- }
-
- content::P2PSocketDispatcher* socket_dispatcher_;
- scoped_refptr<content::P2PHostAddressRequest> request_;
- uint16 port_;
-};
-
-IpcHostResolverFactory::IpcHostResolverFactory(
- content::P2PSocketDispatcher* socket_dispatcher)
- : socket_dispatcher_(socket_dispatcher) {
-}
-
-IpcHostResolverFactory::~IpcHostResolverFactory() {
-}
-
-HostResolver* IpcHostResolverFactory::CreateHostResolver() {
- return new IpcHostResolver(socket_dispatcher_);
-}
-
-} // namespace remoting
diff --git a/remoting/client/ipc_host_resolver.h b/remoting/client/ipc_host_resolver.h
deleted file mode 100644
index 2cd5370..0000000
--- a/remoting/client/ipc_host_resolver.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef REMOTING_CLIENT_IPC_HOST_RESOLVER_H_
-#define REMOTING_CLIENT_IPC_HOST_ADDRESS_RESOLVER_H_
-
-#include "base/compiler_specific.h"
-#include "remoting/jingle_glue/host_resolver.h"
-
-namespace content {
-class P2PSocketDispatcher;
-} // namespace content
-
-namespace remoting {
-
-// Implementation of HostResolverFactory interface that works in
-// renderer.
-//
-// TODO(sergeyu): Move this class to content/renderer/p2p after
-// HostResolver interface is moved to libjingle.
-class IpcHostResolverFactory : public HostResolverFactory {
- public:
- IpcHostResolverFactory(content::P2PSocketDispatcher* socket_dispatcher);
- virtual ~IpcHostResolverFactory();
-
- virtual HostResolver* CreateHostResolver() OVERRIDE;
-
- private:
- content::P2PSocketDispatcher* socket_dispatcher_;
-
- DISALLOW_COPY_AND_ASSIGN(IpcHostResolverFactory);
-};
-
-} // namespace remoting
-
-#endif // REMOTING_JINGLE_GLUE_HOST_RESOLVER_H_
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 40bf1ec..4d9b2c5 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -17,11 +17,6 @@
#include "base/task.h"
#include "base/threading/thread.h"
#include "base/values.h"
-// TODO(sergeyu): We should not depend on renderer here. Instead P2P
-// Pepper API should be used. Remove this dependency.
-// crbug.com/74951
-#include "content/renderer/p2p/ipc_network_manager.h"
-#include "content/renderer/p2p/ipc_socket_factory.h"
#include "media/base/media.h"
#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/cpp/completion_callback.h"
@@ -33,7 +28,6 @@
#include "remoting/base/util.h"
#include "remoting/client/client_config.h"
#include "remoting/client/chromoting_client.h"
-#include "remoting/client/ipc_host_resolver.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
#include "remoting/client/plugin/pepper_input_handler.h"
#include "remoting/client/plugin/pepper_port_allocator_session.h"
@@ -44,13 +38,6 @@
#include "remoting/proto/auth.pb.h"
#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/host_stub.h"
-// TODO(sergeyu): This is a hack: plugin should not depend on webkit
-// glue. It is used here to get P2PPacketDispatcher corresponding to
-// the current RenderView. Use P2P Pepper API for connection and
-// remove these includes.
-// crbug.com/74951
-#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
namespace remoting {
@@ -170,8 +157,7 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
}
host_connection_.reset(new protocol::ConnectionToHost(
- context_.network_message_loop(), this, NULL, NULL, NULL, NULL,
- enable_client_nat_traversal_));
+ context_.network_message_loop(), this, enable_client_nat_traversal_));
input_handler_.reset(new PepperInputHandler(&context_,
host_connection_.get(),
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index e1b62cc..856f040 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -64,10 +64,10 @@ class ChromotingInstance : public pp::InstancePrivate {
virtual ~ChromotingInstance();
// pp::Instance interface.
- virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip)
- OVERRIDE;
- virtual bool Init(uint32_t argc, const char* argn[], const char* argv[])
- OVERRIDE;
+ virtual void DidChangeView(const pp::Rect& position,
+ const pp::Rect& clip) OVERRIDE;
+ virtual bool Init(uint32_t argc, const char* argn[],
+ const char* argv[]) OVERRIDE;
virtual bool HandleInputEvent(const pp::InputEvent& event) OVERRIDE;
// pp::InstancePrivate interface.