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

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

Issue 10909133: Implement clipboard for Chromoting Linux hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use desktop thread for clipboard Created 8 years, 3 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 | « no previous file | remoting/host/clipboard_linux.cc » ('j') | remoting/host/clipboard_linux.cc » ('J')
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/chromoting_host_context.h" 5 #include "remoting/host/chromoting_host_context.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 27 matching lines...) Expand all
38 ui_task_runner_ = NULL; 38 ui_task_runner_ = NULL;
39 } 39 }
40 40
41 bool ChromotingHostContext::Start() { 41 bool ChromotingHostContext::Start() {
42 // Start all the threads. 42 // Start all the threads.
43 bool started = capture_thread_.Start() && encode_thread_.Start() && 43 bool started = capture_thread_.Start() && encode_thread_.Start() &&
44 audio_thread_.StartWithOptions(base::Thread::Options( 44 audio_thread_.StartWithOptions(base::Thread::Options(
45 MessageLoop::TYPE_IO, 0)) && 45 MessageLoop::TYPE_IO, 0)) &&
46 network_thread_.StartWithOptions(base::Thread::Options( 46 network_thread_.StartWithOptions(base::Thread::Options(
47 MessageLoop::TYPE_IO, 0)) && 47 MessageLoop::TYPE_IO, 0)) &&
48 desktop_thread_.Start() && 48 desktop_thread_.StartWithOptions(base::Thread::Options(
49 MessageLoop::TYPE_IO, 0)) &&
49 file_thread_.StartWithOptions( 50 file_thread_.StartWithOptions(
50 base::Thread::Options(MessageLoop::TYPE_IO, 0)); 51 base::Thread::Options(MessageLoop::TYPE_IO, 0));
51 if (!started) 52 if (!started)
52 return false; 53 return false;
53 54
54 // Wrap worker threads with |AutoThreadTaskRunner| and have them reference 55 // Wrap worker threads with |AutoThreadTaskRunner| and have them reference
55 // the main thread via |ui_task_runner_|, to ensure that it remain active to 56 // the main thread via |ui_task_runner_|, to ensure that it remain active to
56 // Stop() them when no references remain. 57 // Stop() them when no references remain.
57 audio_task_runner_ = 58 audio_task_runner_ =
58 new AutoThreadTaskRunner(audio_thread_.message_loop_proxy(), 59 new AutoThreadTaskRunner(audio_thread_.message_loop_proxy(),
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return ui_task_runner_; 108 return ui_task_runner_;
108 } 109 }
109 110
110 const scoped_refptr<net::URLRequestContextGetter>& 111 const scoped_refptr<net::URLRequestContextGetter>&
111 ChromotingHostContext::url_request_context_getter() { 112 ChromotingHostContext::url_request_context_getter() {
112 DCHECK(url_request_context_getter_.get()); 113 DCHECK(url_request_context_getter_.get());
113 return url_request_context_getter_; 114 return url_request_context_getter_;
114 } 115 }
115 116
116 } // namespace remoting 117 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/clipboard_linux.cc » ('j') | remoting/host/clipboard_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698