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

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

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback & rebased Created 7 years, 9 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 #include "remoting/host/ipc_desktop_environment.h" 5 #include "remoting/host/ipc_desktop_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "ipc/ipc_sender.h" 14 #include "ipc/ipc_sender.h"
15 #include "media/video/capture/screen/screen_capturer.h" 15 #include "media/video/capture/screen/screen_capturer.h"
16 #include "remoting/host/audio_capturer.h" 16 #include "remoting/host/audio_capturer.h"
17 #include "remoting/host/chromoting_messages.h" 17 #include "remoting/host/chromoting_messages.h"
18 #include "remoting/host/desktop_session.h" 18 #include "remoting/host/desktop_session.h"
19 #include "remoting/host/desktop_session_proxy.h" 19 #include "remoting/host/desktop_session_proxy.h"
20 #include "remoting/host/event_executor.h" 20 #include "remoting/host/event_executor.h"
21 #include "remoting/host/session_controller.h"
21 22
22 namespace remoting { 23 namespace remoting {
23 24
24 IpcDesktopEnvironment::IpcDesktopEnvironment( 25 IpcDesktopEnvironment::IpcDesktopEnvironment(
25 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 26 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
26 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 27 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
27 const std::string& client_jid, 28 const std::string& client_jid,
28 const base::Closure& disconnect_callback, 29 const base::Closure& disconnect_callback,
29 base::WeakPtr<DesktopSessionConnector> desktop_session_connector, 30 base::WeakPtr<DesktopSessionConnector> desktop_session_connector,
30 bool virtual_terminal) 31 bool virtual_terminal)
(...skipping 21 matching lines...) Expand all
52 53
53 scoped_ptr<EventExecutor> IpcDesktopEnvironment::CreateEventExecutor( 54 scoped_ptr<EventExecutor> IpcDesktopEnvironment::CreateEventExecutor(
54 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 55 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
55 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 56 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
56 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 57 DCHECK(caller_task_runner_->BelongsToCurrentThread());
57 58
58 return desktop_session_proxy_->CreateEventExecutor(input_task_runner, 59 return desktop_session_proxy_->CreateEventExecutor(input_task_runner,
59 ui_task_runner); 60 ui_task_runner);
60 } 61 }
61 62
63 scoped_ptr<SessionController> IpcDesktopEnvironment::CreateSessionController() {
64 DCHECK(caller_task_runner_->BelongsToCurrentThread());
65
66 return desktop_session_proxy_->CreateSessionController();
67 }
68
62 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer( 69 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer(
63 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 70 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
64 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) { 71 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {
65 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 72 DCHECK(caller_task_runner_->BelongsToCurrentThread());
66 73
67 return desktop_session_proxy_->CreateVideoCapturer(capture_task_runner, 74 return desktop_session_proxy_->CreateVideoCapturer(capture_task_runner,
68 encode_task_runner); 75 encode_task_runner);
69 } 76 }
70 77
71 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( 78 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (i != active_connections_.end()) { 186 if (i != active_connections_.end()) {
180 DesktopSessionProxy* desktop_session_proxy = i->second; 187 DesktopSessionProxy* desktop_session_proxy = i->second;
181 active_connections_.erase(i); 188 active_connections_.erase(i);
182 189
183 // Disconnect the client session. 190 // Disconnect the client session.
184 desktop_session_proxy->DisconnectSession(); 191 desktop_session_proxy->DisconnectSession();
185 } 192 }
186 } 193 }
187 194
188 } // namespace remoting 195 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698