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

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: SensSAS() is called from an app now. 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
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 #include "remoting/protocol/host_event_stub.h" 16 #include "remoting/protocol/host_event_stub.h"
17 17
18 namespace base { 18 namespace base {
19 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
20 } // namespace base 20 } // namespace base
21 21
22 namespace IPC { 22 namespace IPC {
23 class ChannelProxy; 23 class ChannelProxy;
24 } // namespace IPC 24 } // namespace IPC
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 class SessionEventExecutorWin : public EventExecutor, 28 class SasInjector;
29 public IPC::Listener { 29
30 class SessionEventExecutorWin : public EventExecutor {
30 public: 31 public:
31 SessionEventExecutorWin( 32 SessionEventExecutorWin(
32 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 34 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
34 scoped_ptr<EventExecutor> nested_executor); 35 scoped_ptr<EventExecutor> nested_executor);
35 ~SessionEventExecutorWin(); 36 ~SessionEventExecutorWin();
36 37
37 // EventExecutor implementation. 38 // EventExecutor implementation.
38 virtual void OnSessionStarted( 39 virtual void OnSessionStarted(
39 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE; 40 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
40 virtual void OnSessionFinished() OVERRIDE; 41 virtual void OnSessionFinished() OVERRIDE;
41 42
42 // protocol::HostStub implementation. 43 // protocol::HostStub implementation.
43 virtual void InjectClipboardEvent( 44 virtual void InjectClipboardEvent(
44 const protocol::ClipboardEvent& event) OVERRIDE; 45 const protocol::ClipboardEvent& event) OVERRIDE;
45 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; 46 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
46 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; 47 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
47 48
48 // IPC::Listener implementation.
49 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
50
51 private: 49 private:
52 // Switches to the desktop receiving a user input if different from 50 // Switches to the desktop receiving a user input if different from
53 // the current one. 51 // the current one.
54 void SwitchToInputDesktop(); 52 void SwitchToInputDesktop();
55 53
56 // Pointer to the next event executor. 54 // Pointer to the next event executor.
57 scoped_ptr<EventExecutor> nested_executor_; 55 scoped_ptr<EventExecutor> nested_executor_;
58 56
59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 57 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
60 58
61 ScopedThreadDesktop desktop_; 59 ScopedThreadDesktop desktop_;
62 60
63 // The Chromoting IPC channel connecting the host with the service. 61 scoped_ptr<SasInjector> sas_injector_;
64 scoped_ptr<IPC::ChannelProxy> chromoting_channel_;
65 62
66 // Keys currently pressed by the client, used to detect Ctrl-Alt-Del. 63 // Keys currently pressed by the client, used to detect Ctrl-Alt-Del.
67 std::set<uint32> pressed_keys_; 64 std::set<uint32> pressed_keys_;
68 65
69 base::WeakPtrFactory<SessionEventExecutorWin> weak_ptr_factory_; 66 base::WeakPtrFactory<SessionEventExecutorWin> weak_ptr_factory_;
70 base::WeakPtr<SessionEventExecutorWin> weak_ptr_; 67 base::WeakPtr<SessionEventExecutorWin> weak_ptr_;
71 68
72 DISALLOW_COPY_AND_ASSIGN(SessionEventExecutorWin); 69 DISALLOW_COPY_AND_ASSIGN(SessionEventExecutorWin);
73 }; 70 };
74 71
75 } // namespace remoting 72 } // namespace remoting
76 73
77 #endif // REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ 74 #endif // REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698