Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: remoting/host/session_event_executor_win.h

Issue 10836224: [Chromoting] Call SendSAS() directly from the host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and made it work. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/sas_injector_win.cc ('k') | remoting/host/session_event_executor_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ 5 #ifndef REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_
6 #define REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ 6 #define REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_
7 7
8 #include <set> 8 #include <set>
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/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "ipc/ipc_channel.h" 13 #include "ipc/ipc_channel.h"
14 #include "remoting/host/event_executor.h" 14 #include "remoting/host/event_executor.h"
15 #include "remoting/host/win/scoped_thread_desktop.h" 15 #include "remoting/host/win/scoped_thread_desktop.h"
16 16
17 namespace base { 17 namespace base {
18 class SingleThreadTaskRunner; 18 class SingleThreadTaskRunner;
19 } // namespace base 19 } // namespace base
20 20
21 namespace IPC { 21 namespace IPC {
22 class ChannelProxy; 22 class ChannelProxy;
23 } // namespace IPC 23 } // namespace IPC
24 24
25 namespace remoting { 25 namespace remoting {
26 26
27 class SessionEventExecutorWin : public EventExecutor, 27 class SasInjector;
28 public IPC::Listener { 28
29 class SessionEventExecutorWin : public EventExecutor {
29 public: 30 public:
30 SessionEventExecutorWin( 31 SessionEventExecutorWin(
31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 32 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
32 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
33 scoped_ptr<EventExecutor> nested_executor); 34 scoped_ptr<EventExecutor> nested_executor);
34 ~SessionEventExecutorWin(); 35 ~SessionEventExecutorWin();
35 36
36 // EventExecutor implementation. 37 // EventExecutor implementation.
37 virtual void OnSessionStarted( 38 virtual void OnSessionStarted(
38 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE; 39 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
39 virtual void OnSessionFinished() OVERRIDE; 40 virtual void OnSessionFinished() OVERRIDE;
40 41
41 // protocol::ClipboardStub implementation. 42 // protocol::ClipboardStub implementation.
42 virtual void InjectClipboardEvent( 43 virtual void InjectClipboardEvent(
43 const protocol::ClipboardEvent& event) OVERRIDE; 44 const protocol::ClipboardEvent& event) OVERRIDE;
44 45
45 // protocol::InputStub implementation. 46 // protocol::InputStub implementation.
46 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; 47 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
47 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; 48 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
48 49
49 // IPC::Listener implementation.
50 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
51
52 private: 50 private:
53 // Switches to the desktop receiving a user input if different from 51 // Switches to the desktop receiving a user input if different from
54 // the current one. 52 // the current one.
55 void SwitchToInputDesktop(); 53 void SwitchToInputDesktop();
56 54
57 // Pointer to the next event executor. 55 // Pointer to the next event executor.
58 scoped_ptr<EventExecutor> nested_executor_; 56 scoped_ptr<EventExecutor> nested_executor_;
59 57
60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 58 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
61 59
62 ScopedThreadDesktop desktop_; 60 ScopedThreadDesktop desktop_;
63 61
64 // The Chromoting IPC channel connecting the host with the service. 62 scoped_ptr<SasInjector> sas_injector_;
65 scoped_ptr<IPC::ChannelProxy> chromoting_channel_;
66 63
67 // Keys currently pressed by the client, used to detect Ctrl-Alt-Del. 64 // Keys currently pressed by the client, used to detect Ctrl-Alt-Del.
68 std::set<uint32> pressed_keys_; 65 std::set<uint32> pressed_keys_;
69 66
70 base::WeakPtrFactory<SessionEventExecutorWin> weak_ptr_factory_; 67 base::WeakPtrFactory<SessionEventExecutorWin> weak_ptr_factory_;
71 base::WeakPtr<SessionEventExecutorWin> weak_ptr_; 68 base::WeakPtr<SessionEventExecutorWin> weak_ptr_;
72 69
73 DISALLOW_COPY_AND_ASSIGN(SessionEventExecutorWin); 70 DISALLOW_COPY_AND_ASSIGN(SessionEventExecutorWin);
74 }; 71 };
75 72
76 } // namespace remoting 73 } // namespace remoting
77 74
78 #endif // REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ 75 #endif // REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_
OLDNEW
« no previous file with comments | « remoting/host/sas_injector_win.cc ('k') | remoting/host/session_event_executor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698