diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 00:50:28 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-17 00:50:28 +0000 |
commit | 9febc508fe46d3dfdc27d634b6088cb1d99cf7ef (patch) | |
tree | 424f1325aef22a1701a7db726e5401c00d87d59a /remoting | |
parent | 53b35b1ad9587c497a693ef57940b392bf9390dc (diff) | |
download | chromium_src-9febc508fe46d3dfdc27d634b6088cb1d99cf7ef.zip chromium_src-9febc508fe46d3dfdc27d634b6088cb1d99cf7ef.tar.gz chromium_src-9febc508fe46d3dfdc27d634b6088cb1d99cf7ef.tar.bz2 |
Chromoting: reverting most of r126520 which broke the Secure Attention Sequence emulation on Windows. The host should detect whether the emulation is available in runtime. Doing it during compilation requires a major surgery on remoting/remoting.gyp.
Review URL: http://codereview.chromium.org/9699081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/desktop_environment.cc | 4 | ||||
-rw-r--r-- | remoting/host/session_event_executor_win.cc | 16 | ||||
-rw-r--r-- | remoting/host/session_event_executor_win.h | 12 | ||||
-rw-r--r-- | remoting/remoting.gyp | 25 |
4 files changed, 44 insertions, 13 deletions
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc index 75e784b..874a3c8 100644 --- a/remoting/host/desktop_environment.cc +++ b/remoting/host/desktop_environment.cc @@ -11,7 +11,7 @@ #include "remoting/host/chromoting_host_context.h" #include "remoting/host/event_executor.h" -#if defined(USE_CHROMOTING_IPC) +#if defined(OS_WIN) #include "remoting/host/session_event_executor_win.h" #endif @@ -30,7 +30,7 @@ scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create( return scoped_ptr<DesktopEnvironment>(); } -#if defined(USE_CHROMOTING_IPC) +#if defined(OS_WIN) event_executor.reset(new SessionEventExecutorWin( context->desktop_message_loop(), context->io_message_loop(), diff --git a/remoting/host/session_event_executor_win.cc b/remoting/host/session_event_executor_win.cc index 31eccff..c8aab9f 100644 --- a/remoting/host/session_event_executor_win.cc +++ b/remoting/host/session_event_executor_win.cc @@ -26,13 +26,14 @@ const char kProcessChannelId[] = "chromoting-ipc"; namespace remoting { +using protocol::ClipboardEvent; using protocol::MouseEvent; using protocol::KeyEvent; SessionEventExecutorWin::SessionEventExecutorWin( MessageLoop* message_loop, base::MessageLoopProxy* io_message_loop, - scoped_ptr<protocol::InputStub> nested_executor) + scoped_ptr<protocol::HostEventStub> nested_executor) : nested_executor_(nested_executor.Pass()), message_loop_(message_loop), scroll_pressed_(false) { @@ -53,6 +54,19 @@ SessionEventExecutorWin::SessionEventExecutorWin( SessionEventExecutorWin::~SessionEventExecutorWin() { } +void SessionEventExecutorWin::InjectClipboardEvent( + const ClipboardEvent& event) { + if (MessageLoop::current() != message_loop_) { + message_loop_->PostTask( + FROM_HERE, + base::Bind(&SessionEventExecutorWin::InjectClipboardEvent, + base::Unretained(this), event)); + return; + } + + nested_executor_->InjectClipboardEvent(event); +} + void SessionEventExecutorWin::InjectKeyEvent(const KeyEvent& event) { if (MessageLoop::current() != message_loop_) { message_loop_->PostTask( diff --git a/remoting/host/session_event_executor_win.h b/remoting/host/session_event_executor_win.h index 3e33c44..cf73f03 100644 --- a/remoting/host/session_event_executor_win.h +++ b/remoting/host/session_event_executor_win.h @@ -10,7 +10,7 @@ #include "ipc/ipc_channel.h" #include "remoting/host/event_executor.h" -#include "remoting/protocol/input_stub.h" +#include "remoting/protocol/host_event_stub.h" class MessageLoop; @@ -24,14 +24,18 @@ class ChannelProxy; namespace remoting { -class SessionEventExecutorWin : public protocol::InputStub, +class SessionEventExecutorWin : public protocol::HostEventStub, public IPC::Channel::Listener { public: SessionEventExecutorWin(MessageLoop* message_loop, base::MessageLoopProxy* io_message_loop, - scoped_ptr<protocol::InputStub> nested_executor); + scoped_ptr<protocol::HostEventStub> nested_executor); ~SessionEventExecutorWin(); + // ClipboardStub interface. + virtual void InjectClipboardEvent( + const protocol::ClipboardEvent& event) OVERRIDE; + // protocol::InputStub implementation. virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; @@ -41,7 +45,7 @@ class SessionEventExecutorWin : public protocol::InputStub, private: // Pointer to the next event executor. - scoped_ptr<protocol::InputStub> nested_executor_; + scoped_ptr<protocol::HostEventStub> nested_executor_; MessageLoop* message_loop_; diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 5f959ec..184ba6d 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -341,6 +341,11 @@ }], ], # conditions }], # OS=="mac" + [ 'OS=="win"', { + 'dependencies': [ + '../ipc/ipc.gyp:ipc' + ], + }], ['OS!="win"', { 'sources!': [ 'host/plugin/host_plugin.def', @@ -583,6 +588,8 @@ 'host/screen_recorder.h', 'host/server_log_entry.cc', 'host/server_log_entry.h', + 'host/session_event_executor_win.cc', + 'host/session_event_executor_win.h', 'host/signaling_connector.cc', 'host/signaling_connector.h', 'host/ui_strings.cc', @@ -701,6 +708,13 @@ 'host/it2me_host_user_interface.h', 'host/simple_host_process.cc', ], + 'conditions': [ + ['OS=="win"', { + 'dependencies': [ + '../ipc/ipc.gyp:ipc' + ], + }], + ], }, # end of target 'remoting_simple_host' { @@ -732,16 +746,10 @@ 'sources': [ 'host/host_event_logger_win.cc', 'host/remoting_host_messages.mc', - 'host/session_event_executor_win.cc', - 'host/session_event_executor_win.h', ], 'include_dirs': [ '<(INTERMEDIATE_DIR)', ], - # Allow the host to connect to the remoting service. - 'defines': [ - 'USE_CHROMOTING_IPC', - ], # Rule to run the message compiler. 'rules': [ { @@ -1042,6 +1050,11 @@ 'run_all_unittests.cc', ], 'conditions': [ + [ 'OS=="win"', { + 'dependencies': [ + '../ipc/ipc.gyp:ipc' + ], + }], ['chromeos == 0', { 'dependencies': [ 'remoting_host' |