summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 20:26:29 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 20:26:29 +0000
commit7f44ba4d86341308a888455858426adcc1e713e4 (patch)
tree24d9aab3946f82314ab93fd80dee96f447b1f10c
parentbb5e0001628e91fccba24c07d5767e3faa0c8c43 (diff)
downloadchromium_src-7f44ba4d86341308a888455858426adcc1e713e4.zip
chromium_src-7f44ba4d86341308a888455858426adcc1e713e4.tar.gz
chromium_src-7f44ba4d86341308a888455858426adcc1e713e4.tar.bz2
[Chromoting] Let the Windows IT2Me host send clipboard events to the client.
This CL lets ClipboardWin send clipboard events to ClientSession. BUG=117473 Review URL: https://chromiumcodereview.appspot.com/10413060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139854 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/host/chromoting_host.cc2
-rw-r--r--remoting/host/client_session.cc11
-rw-r--r--remoting/host/client_session.h8
-rw-r--r--remoting/host/clipboard.h3
-rw-r--r--remoting/host/clipboard_linux.cc6
-rw-r--r--remoting/host/clipboard_mac.mm6
-rw-r--r--remoting/host/clipboard_win.cc16
-rw-r--r--remoting/host/desktop_environment.cc5
-rw-r--r--remoting/host/desktop_environment.h6
-rw-r--r--remoting/host/event_executor.h4
-rw-r--r--remoting/host/event_executor_linux.cc6
-rw-r--r--remoting/host/event_executor_mac.cc6
-rw-r--r--remoting/host/event_executor_win.cc11
-rw-r--r--remoting/host/host_mock_objects.cc3
-rw-r--r--remoting/host/host_mock_objects.h3
-rw-r--r--remoting/host/session_event_executor_win.cc3
-rw-r--r--remoting/host/session_event_executor_win.h3
-rw-r--r--remoting/protocol/clipboard_thread_proxy.cc40
-rw-r--r--remoting/protocol/clipboard_thread_proxy.h51
-rw-r--r--remoting/protocol/connection_to_client.cc5
-rw-r--r--remoting/remoting.gyp2
21 files changed, 171 insertions, 29 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 8c30d1a..81f87bc 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -229,7 +229,7 @@ void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {
// Immediately add the connection and start the session.
recorder_->AddConnection(client->connection());
recorder_->Start();
- desktop_environment_->OnSessionStarted();
+ desktop_environment_->OnSessionStarted(client->CreateClipboardProxy());
FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
OnClientConnected(client->client_jid()));
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 86a6753..dd32400 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -11,6 +11,7 @@
#include "remoting/proto/control.pb.h"
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/client_stub.h"
+#include "remoting/protocol/clipboard_thread_proxy.h"
namespace remoting {
@@ -27,6 +28,7 @@ ClientSession::ClientSession(
input_tracker_(host_event_stub_),
remote_input_filter_(&input_tracker_),
mouse_input_filter_(&remote_input_filter_),
+ client_clipboard_factory_(clipboard_echo_filter_.client_filter()),
capturer_(capturer) {
connection_->SetEventHandler(this);
@@ -164,4 +166,13 @@ void ClientSession::SetDisableInputs(bool disable_inputs) {
}
}
+scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
+ DCHECK(CalledOnValidThread());
+
+ return scoped_ptr<protocol::ClipboardStub>(
+ new protocol::ClipboardThreadProxy(
+ client_clipboard_factory_.GetWeakPtr(),
+ base::MessageLoopProxy::current()));
+}
+
} // namespace remoting
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index fd2b9a08..e15793a 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -121,6 +121,9 @@ class ClientSession : public protocol::HostEventStub,
// keys or mouse buttons pressed then these will be released.
void SetDisableInputs(bool disable_inputs);
+ // Creates a proxy for sending clipboard events to the client.
+ scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
+
private:
EventHandler* event_handler_;
@@ -153,6 +156,11 @@ class ClientSession : public protocol::HostEventStub,
// back to it.
protocol::ClipboardEchoFilter clipboard_echo_filter_;
+ // Factory for weak pointers to the client clipboard stub.
+ // This must appear after |clipboard_echo_filter_|, so that it won't outlive
+ // it.
+ base::WeakPtrFactory<ClipboardStub> client_clipboard_factory_;
+
// Capturer, used to determine current screen size for ensuring injected
// mouse events fall within the screen area.
// TODO(lambroslambrou): Move floor-control logic, and clamping to screen
diff --git a/remoting/host/clipboard.h b/remoting/host/clipboard.h
index e02c09d..8ebe2d8 100644
--- a/remoting/host/clipboard.h
+++ b/remoting/host/clipboard.h
@@ -13,6 +13,7 @@ namespace remoting {
namespace protocol {
class ClipboardEvent;
+class ClipboardStub;
} // namespace protocol
// All Clipboard methods should be run on the UI thread, so that the Clipboard
@@ -22,7 +23,7 @@ class Clipboard {
virtual ~Clipboard() {};
// Initialises any objects needed to read from or write to the clipboard.
- virtual void Start() = 0;
+ virtual void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0;
// Destroys any objects initialised by Start().
virtual void Stop() = 0;
diff --git a/remoting/host/clipboard_linux.cc b/remoting/host/clipboard_linux.cc
index 56fa37b..6a17291 100644
--- a/remoting/host/clipboard_linux.cc
+++ b/remoting/host/clipboard_linux.cc
@@ -13,7 +13,8 @@ class ClipboardLinux : public Clipboard {
ClipboardLinux();
// Must be called on the UI thread.
- virtual void Start() OVERRIDE;
+ virtual void Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) OVERRIDE;
virtual void Stop() OVERRIDE;
@@ -22,7 +23,8 @@ class ClipboardLinux : public Clipboard {
DISALLOW_COPY_AND_ASSIGN(ClipboardLinux);
};
-void ClipboardLinux::Start() {
+void ClipboardLinux::Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
NOTIMPLEMENTED();
}
diff --git a/remoting/host/clipboard_mac.mm b/remoting/host/clipboard_mac.mm
index fb400b3..bea57d1 100644
--- a/remoting/host/clipboard_mac.mm
+++ b/remoting/host/clipboard_mac.mm
@@ -13,7 +13,8 @@ class ClipboardMac : public Clipboard {
ClipboardMac();
// Must be called on the UI thread.
- virtual void Start() OVERRIDE;
+ virtual void Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) OVERRIDE;
virtual void Stop() OVERRIDE;
@@ -22,7 +23,8 @@ class ClipboardMac : public Clipboard {
DISALLOW_COPY_AND_ASSIGN(ClipboardMac);
};
-void ClipboardMac::Start() {
+void ClipboardMac::Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
NOTIMPLEMENTED();
}
diff --git a/remoting/host/clipboard_win.cc b/remoting/host/clipboard_win.cc
index 0021e1f..cc504ba 100644
--- a/remoting/host/clipboard_win.cc
+++ b/remoting/host/clipboard_win.cc
@@ -18,6 +18,7 @@
#include "base/win/wrapped_window_proc.h"
#include "remoting/base/constants.h"
#include "remoting/proto/event.pb.h"
+#include "remoting/protocol/clipboard_stub.h"
namespace {
@@ -104,7 +105,8 @@ class ClipboardWin : public Clipboard {
public:
ClipboardWin();
- virtual void Start() OVERRIDE;
+ virtual void Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) OVERRIDE;
virtual void Stop() OVERRIDE;
@@ -117,6 +119,7 @@ class ClipboardWin : public Clipboard {
static LRESULT CALLBACK WndProc(HWND hwmd, UINT msg, WPARAM wParam,
LPARAM lParam);
+ scoped_ptr<protocol::ClipboardStub> client_clipboard_;
HWND hwnd_;
AddClipboardFormatListenerFn* add_clipboard_format_listener_;
RemoveClipboardFormatListenerFn* remove_clipboard_format_listener_;
@@ -132,7 +135,10 @@ ClipboardWin::ClipboardWin()
load_functions_tried_(false) {
}
-void ClipboardWin::Start() {
+void ClipboardWin::Start(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
+ client_clipboard_.swap(client_clipboard);
+
if (!load_functions_tried_) {
load_functions_tried_ = true;
HMODULE user32_module = ::GetModuleHandle(L"user32.dll");
@@ -176,6 +182,8 @@ void ClipboardWin::Start() {
}
void ClipboardWin::Stop() {
+ client_clipboard_.reset();
+
if (hwnd_) {
if (HaveClipboardListenerApi()) {
(*remove_clipboard_format_listener_)(hwnd_);
@@ -253,7 +261,9 @@ void ClipboardWin::OnClipboardUpdate() {
event.set_mime_type(kMimeTypeTextUtf8);
event.set_data(UTF16ToUTF8(text));
- // TODO(simonmorris): Send the event to the client.
+ if (client_clipboard_.get()) {
+ client_clipboard_->InjectClipboardEvent(event);
+ }
}
}
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc
index aacd831..26921ac 100644
--- a/remoting/host/desktop_environment.cc
+++ b/remoting/host/desktop_environment.cc
@@ -86,8 +86,9 @@ DesktopEnvironment::DesktopEnvironment(
DesktopEnvironment::~DesktopEnvironment() {
}
-void DesktopEnvironment::OnSessionStarted() {
- event_executor_->OnSessionStarted();
+void DesktopEnvironment::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
+ event_executor_->OnSessionStarted(client_clipboard.Pass());
}
void DesktopEnvironment::OnSessionFinished() {
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h
index f49fcdc..745cf2f 100644
--- a/remoting/host/desktop_environment.h
+++ b/remoting/host/desktop_environment.h
@@ -8,10 +8,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/time.h"
-#include "remoting/base/scoped_thread_proxy.h"
#include "remoting/host/event_executor.h"
namespace remoting {
@@ -20,6 +17,7 @@ class Capturer;
class ChromotingHostContext;
namespace protocol {
+class ClipboardStub;
class HostEventStub;
};
@@ -42,7 +40,7 @@ class DesktopEnvironment {
Capturer* capturer() const { return capturer_.get(); }
EventExecutor* event_executor() const { return event_executor_.get(); }
- void OnSessionStarted();
+ void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard);
void OnSessionFinished();
private:
diff --git a/remoting/host/event_executor.h b/remoting/host/event_executor.h
index 51dcfe3..d033915 100644
--- a/remoting/host/event_executor.h
+++ b/remoting/host/event_executor.h
@@ -6,6 +6,7 @@
#define REMOTING_HOST_EVENT_EXECUTOR_H_
#include "base/memory/scoped_ptr.h"
+#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/host_event_stub.h"
class MessageLoop;
@@ -28,7 +29,8 @@ class EventExecutor : public protocol::HostEventStub {
Capturer* capturer);
// Initialises any objects needed to execute events.
- virtual void OnSessionStarted() = 0;
+ virtual void OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0;
// Destroys any objects constructed by Start().
virtual void OnSessionFinished() = 0;
diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc
index 5fe35e1..d3bda35 100644
--- a/remoting/host/event_executor_linux.cc
+++ b/remoting/host/event_executor_linux.cc
@@ -48,7 +48,8 @@ class EventExecutorLinux : public EventExecutor {
virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE;
// EventExecutor interface.
- virtual void OnSessionStarted() OVERRIDE;
+ virtual void OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void OnSessionFinished() OVERRIDE;
private:
@@ -419,7 +420,8 @@ void EventExecutorLinux::InjectMouseEvent(const MouseEvent& event) {
XFlush(display_);
}
-void EventExecutorLinux::OnSessionStarted() {
+void EventExecutorLinux::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
return;
}
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index 6058b42..2d9469a 100644
--- a/remoting/host/event_executor_mac.cc
+++ b/remoting/host/event_executor_mac.cc
@@ -42,7 +42,8 @@ class EventExecutorMac : public EventExecutor {
virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE;
// EventExecutor interface.
- virtual void OnSessionStarted() OVERRIDE;
+ virtual void OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void OnSessionFinished() OVERRIDE;
private:
@@ -326,7 +327,8 @@ void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
}
}
-void EventExecutorMac::OnSessionStarted() {
+void EventExecutorMac::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
return;
}
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index 430266a..507e96a 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -44,7 +44,8 @@ class EventExecutorWin : public EventExecutor {
virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE;
// EventExecutor interface.
- virtual void OnSessionStarted() OVERRIDE;
+ virtual void OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void OnSessionFinished() OVERRIDE;
private:
@@ -106,16 +107,18 @@ void EventExecutorWin::InjectMouseEvent(const MouseEvent& event) {
HandleMouse(event);
}
-void EventExecutorWin::OnSessionStarted() {
+void EventExecutorWin::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
if (!ui_loop_->BelongsToCurrentThread()) {
ui_loop_->PostTask(
FROM_HERE,
base::Bind(&EventExecutorWin::OnSessionStarted,
- base::Unretained(this)));
+ base::Unretained(this),
+ base::Passed(&client_clipboard)));
return;
}
- clipboard_->Start();
+ clipboard_->Start(client_clipboard.Pass());
}
void EventExecutorWin::OnSessionFinished() {
diff --git a/remoting/host/host_mock_objects.cc b/remoting/host/host_mock_objects.cc
index bbc1631..f2b5ef9 100644
--- a/remoting/host/host_mock_objects.cc
+++ b/remoting/host/host_mock_objects.cc
@@ -27,6 +27,9 @@ MockEventExecutor::MockEventExecutor() {}
MockEventExecutor::~MockEventExecutor() {}
+void MockEventExecutor::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {}
+
MockDisconnectWindow::MockDisconnectWindow() {}
MockDisconnectWindow::~MockDisconnectWindow() {}
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h
index ea34f82..79e50a0 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -127,9 +127,10 @@ class MockEventExecutor : public EventExecutor {
void(const protocol::ClipboardEvent& event));
MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent& event));
MOCK_METHOD1(InjectMouseEvent, void(const protocol::MouseEvent& event));
- MOCK_METHOD0(OnSessionStarted, void());
MOCK_METHOD0(OnSessionFinished, void());
+ void OnSessionStarted(scoped_ptr<protocol::ClipboardStub> client_clipboard);
+
private:
DISALLOW_COPY_AND_ASSIGN(MockEventExecutor);
};
diff --git a/remoting/host/session_event_executor_win.cc b/remoting/host/session_event_executor_win.cc
index 002375f..f6366c7 100644
--- a/remoting/host/session_event_executor_win.cc
+++ b/remoting/host/session_event_executor_win.cc
@@ -68,7 +68,8 @@ SessionEventExecutorWin::SessionEventExecutorWin(
SessionEventExecutorWin::~SessionEventExecutorWin() {
}
-void SessionEventExecutorWin::OnSessionStarted() {
+void SessionEventExecutorWin::OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) {
// TODO(simonmorris): Delegate to the nested executor.
}
diff --git a/remoting/host/session_event_executor_win.h b/remoting/host/session_event_executor_win.h
index 267fe59..d3e650c 100644
--- a/remoting/host/session_event_executor_win.h
+++ b/remoting/host/session_event_executor_win.h
@@ -36,7 +36,8 @@ class SessionEventExecutorWin : public EventExecutor,
~SessionEventExecutorWin();
// EventExecutor implementation.
- virtual void OnSessionStarted() OVERRIDE;
+ virtual void OnSessionStarted(
+ scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void OnSessionFinished() OVERRIDE;
// protocol::HostStub implementation.
diff --git a/remoting/protocol/clipboard_thread_proxy.cc b/remoting/protocol/clipboard_thread_proxy.cc
new file mode 100644
index 0000000..ef5f5e8
--- /dev/null
+++ b/remoting/protocol/clipboard_thread_proxy.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 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/protocol/clipboard_thread_proxy.h"
+
+#include "base/bind.h"
+#include "base/message_loop.h"
+#include "remoting/proto/event.pb.h"
+
+namespace remoting {
+namespace protocol {
+
+ClipboardThreadProxy::~ClipboardThreadProxy() {
+}
+
+ClipboardThreadProxy::ClipboardThreadProxy(
+ const base::WeakPtr<ClipboardStub>& clipboard_stub,
+ scoped_refptr<base::TaskRunner> clipboard_stub_task_runner)
+ : clipboard_stub_(clipboard_stub),
+ clipboard_stub_task_runner_(clipboard_stub_task_runner) {
+}
+
+void ClipboardThreadProxy::InjectClipboardEvent(const ClipboardEvent& event) {
+ clipboard_stub_task_runner_->PostTask(FROM_HERE, base::Bind(
+ &ClipboardThreadProxy::InjectClipboardEventStatic,
+ clipboard_stub_,
+ event));
+}
+
+void ClipboardThreadProxy::InjectClipboardEventStatic(
+ const base::WeakPtr<ClipboardStub>& clipboard_stub,
+ const ClipboardEvent& event) {
+ if (clipboard_stub.get()) {
+ clipboard_stub->InjectClipboardEvent(event);
+ }
+}
+
+} // namespace protocol
+} // namespace remoting
diff --git a/remoting/protocol/clipboard_thread_proxy.h b/remoting/protocol/clipboard_thread_proxy.h
new file mode 100644
index 0000000..14f3a45
--- /dev/null
+++ b/remoting/protocol/clipboard_thread_proxy.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2012 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.
+
+// ClipboardThreadProxy is used to allow a Clipboard on the UI thread to invoke
+// a ClipboardStub on the network thread.
+
+#ifndef REMOTING_PROTOCOL_CLIPBOARD_THREAD_PROXY_H_
+#define REMOTING_PROTOCOL_CLIPBOARD_THREAD_PROXY_H_
+
+#include "base/memory/weak_ptr.h"
+#include "base/task_runner.h"
+#include "remoting/protocol/clipboard_stub.h"
+
+namespace base {
+class MessageLoopProxy;
+} // namespace base
+
+namespace remoting {
+namespace protocol {
+
+class ClipboardThreadProxy : public ClipboardStub {
+ public:
+ virtual ~ClipboardThreadProxy();
+
+ // Constructs a proxy for |clipboard_stub| which will trampoline invocations
+ // to |clipboard_stub_task_runner|.
+ ClipboardThreadProxy(
+ const base::WeakPtr<ClipboardStub>& clipboard_stub,
+ scoped_refptr<base::TaskRunner> clipboard_stub_task_runner);
+
+ // ClipboardStub implementation.
+ virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE;
+
+ private:
+ // Injects a clipboard event into a stub, if the given weak pointer to the
+ // stub is valid.
+ static void InjectClipboardEventStatic(
+ const base::WeakPtr<ClipboardStub>& clipboard_stub,
+ const ClipboardEvent& event);
+
+ base::WeakPtr<ClipboardStub> clipboard_stub_;
+ scoped_refptr<base::TaskRunner> clipboard_stub_task_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(ClipboardThreadProxy);
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_CLIPBOARD_THREAD_PROXY_H_
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index 1283172..ce8cbdb 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -102,8 +102,6 @@ void ConnectionToClient::OnSessionStateChange(Session::State state) {
break;
case Session::AUTHENTICATED:
- handler_->OnConnectionAuthenticated(this);
-
// Initialize channels.
control_dispatcher_.reset(new HostControlDispatcher());
control_dispatcher_->Init(session_.get(), base::Bind(
@@ -122,6 +120,9 @@ void ConnectionToClient::OnSessionStateChange(Session::State state) {
video_writer_->Init(session_.get(), base::Bind(
&ConnectionToClient::OnChannelInitialized, base::Unretained(this)));
+ // Notify the handler after initializing the channels, so that
+ // ClientSession can get a client clipboard stub.
+ handler_->OnConnectionAuthenticated(this);
break;
case Session::CLOSED:
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index 93ac020..277c120 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -1476,6 +1476,8 @@
'protocol/clipboard_echo_filter.h',
'protocol/clipboard_filter.h',
'protocol/clipboard_filter.cc',
+ 'protocol/clipboard_thread_proxy.cc',
+ 'protocol/clipboard_thread_proxy.h',
'protocol/clipboard_stub.h',
'protocol/connection_to_client.cc',
'protocol/connection_to_client.h',