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

Side by Side Diff: remoting/host/desktop_environment.cc

Issue 10381115: [Chromoting] The Windows IT2Me host gets any new text items it finds on the clipboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 8 years, 7 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/clipboard_win.cc ('k') | remoting/host/event_executor.h » ('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 #include "remoting/host/desktop_environment.h" 5 #include "remoting/host/desktop_environment.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "remoting/host/capturer.h" 9 #include "remoting/host/capturer.h"
10 #include "remoting/host/chromoting_host.h" 10 #include "remoting/host/chromoting_host.h"
11 #include "remoting/host/chromoting_host_context.h" 11 #include "remoting/host/chromoting_host_context.h"
12 #include "remoting/host/event_executor.h" 12 #include "remoting/host/event_executor.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "remoting/host/session_event_executor_win.h" 15 #include "remoting/host/session_event_executor_win.h"
16 #endif 16 #endif
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 // static 20 // static
21 scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create( 21 scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create(
22 ChromotingHostContext* context) { 22 ChromotingHostContext* context) {
23 scoped_ptr<Capturer> capturer(Capturer::Create()); 23 scoped_ptr<Capturer> capturer(Capturer::Create());
24 scoped_ptr<EventExecutor> event_executor = 24 scoped_ptr<EventExecutor> event_executor =
25 EventExecutor::Create(context->desktop_message_loop(), capturer.get()); 25 EventExecutor::Create(context->desktop_message_loop(),
26 context->ui_message_loop(),
27 capturer.get());
26 28
27 if (capturer.get() == NULL || event_executor.get() == NULL) { 29 if (capturer.get() == NULL || event_executor.get() == NULL) {
28 LOG(ERROR) << "Unable to create DesktopEnvironment"; 30 LOG(ERROR) << "Unable to create DesktopEnvironment";
29 return scoped_ptr<DesktopEnvironment>(); 31 return scoped_ptr<DesktopEnvironment>();
30 } 32 }
31 33
32 return scoped_ptr<DesktopEnvironment>( 34 return scoped_ptr<DesktopEnvironment>(
33 new DesktopEnvironment(context, 35 new DesktopEnvironment(context,
34 capturer.Pass(), 36 capturer.Pass(),
35 event_executor.Pass())); 37 event_executor.Pass()));
36 } 38 }
37 39
38 // static 40 // static
39 scoped_ptr<DesktopEnvironment> DesktopEnvironment::CreateForService( 41 scoped_ptr<DesktopEnvironment> DesktopEnvironment::CreateForService(
40 ChromotingHostContext* context) { 42 ChromotingHostContext* context) {
41 scoped_ptr<Capturer> capturer(Capturer::Create()); 43 scoped_ptr<Capturer> capturer(Capturer::Create());
42 scoped_ptr<EventExecutor> event_executor = 44 scoped_ptr<EventExecutor> event_executor =
43 EventExecutor::Create(context->desktop_message_loop(), capturer.get()); 45 EventExecutor::Create(context->desktop_message_loop(),
46 context->ui_message_loop(),
47 capturer.get());
44 48
45 if (capturer.get() == NULL || event_executor.get() == NULL) { 49 if (capturer.get() == NULL || event_executor.get() == NULL) {
46 LOG(ERROR) << "Unable to create DesktopEnvironment"; 50 LOG(ERROR) << "Unable to create DesktopEnvironment";
47 return scoped_ptr<DesktopEnvironment>(); 51 return scoped_ptr<DesktopEnvironment>();
48 } 52 }
49 53
50 #if defined(OS_WIN) 54 #if defined(OS_WIN)
51 event_executor.reset(new SessionEventExecutorWin( 55 event_executor.reset(new SessionEventExecutorWin(
52 context->desktop_message_loop(), 56 context->desktop_message_loop(),
53 context->file_message_loop(), 57 context->file_message_loop(),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 90
87 void DesktopEnvironment::OnSessionStarted() { 91 void DesktopEnvironment::OnSessionStarted() {
88 event_executor_->OnSessionStarted(); 92 event_executor_->OnSessionStarted();
89 } 93 }
90 94
91 void DesktopEnvironment::OnSessionFinished() { 95 void DesktopEnvironment::OnSessionFinished() {
92 event_executor_->OnSessionFinished(); 96 event_executor_->OnSessionFinished();
93 } 97 }
94 98
95 } // namespace remoting 99 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/clipboard_win.cc ('k') | remoting/host/event_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698