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

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: 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 ConnectToDesktopSession();
Jamie 2013/03/09 00:53:18 Why is this call needed for CreateSessionControlle
alexeypa (please no reviews) 2013/03/09 01:05:34 It is not needed. I guess I didn't pick one of fix
67 return desktop_session_proxy_->CreateSessionController();
68 }
69
62 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer( 70 scoped_ptr<media::ScreenCapturer> IpcDesktopEnvironment::CreateVideoCapturer(
63 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 71 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
64 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) { 72 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {
65 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 73 DCHECK(caller_task_runner_->BelongsToCurrentThread());
66 74
67 return desktop_session_proxy_->CreateVideoCapturer(capture_task_runner, 75 return desktop_session_proxy_->CreateVideoCapturer(capture_task_runner,
68 encode_task_runner); 76 encode_task_runner);
69 } 77 }
70 78
71 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory( 79 IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (i != active_connections_.end()) { 187 if (i != active_connections_.end()) {
180 DesktopSessionProxy* desktop_session_proxy = i->second; 188 DesktopSessionProxy* desktop_session_proxy = i->second;
181 active_connections_.erase(i); 189 active_connections_.erase(i);
182 190
183 // Disconnect the client session. 191 // Disconnect the client session.
184 desktop_session_proxy->DisconnectSession(); 192 desktop_session_proxy->DisconnectSession();
185 } 193 }
186 } 194 }
187 195
188 } // namespace remoting 196 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698