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

Unified Diff: remoting/host/simple_host_process.cc

Issue 10909143: Revert 155574 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to Cl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/simple_host_process.cc
===================================================================
--- remoting/host/simple_host_process.cc (revision 155615)
+++ remoting/host/simple_host_process.cc (working copy)
@@ -41,8 +41,6 @@
#include "remoting/host/desktop_environment.h"
#include "remoting/host/dns_blackhole_checker.h"
#include "remoting/host/event_executor.h"
-#include "remoting/host/desktop_environment.h"
-#include "remoting/host/desktop_environment_factory.h"
#include "remoting/host/heartbeat_sender.h"
#include "remoting/host/host_key_pair.h"
#include "remoting/host/host_secret.h"
@@ -96,36 +94,6 @@
namespace remoting {
-class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
- public:
- FakeDesktopEnvironmentFactory();
- virtual ~FakeDesktopEnvironmentFactory();
-
- virtual scoped_ptr<DesktopEnvironment> Create(
- ChromotingHostContext* context) OVERRIDE;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironmentFactory);
-};
-
-FakeDesktopEnvironmentFactory::FakeDesktopEnvironmentFactory() {
-}
-
-FakeDesktopEnvironmentFactory::~FakeDesktopEnvironmentFactory() {
-}
-
-scoped_ptr<DesktopEnvironment> FakeDesktopEnvironmentFactory::Create(
- ChromotingHostContext* context) {
- scoped_ptr<VideoFrameCapturer> capturer(new VideoFrameCapturerFake());
- scoped_ptr<EventExecutor> event_executor = EventExecutor::Create(
- context->desktop_task_runner(),
- context->ui_task_runner());
- scoped_ptr<AudioCapturer> audio_capturer(NULL);
- return scoped_ptr<DesktopEnvironment>(new DesktopEnvironment(
- audio_capturer.Pass(),
- event_executor.Pass(),
- capturer.Pass()));
-}
-
class SimpleHost : public HeartbeatSender::Listener {
public:
SimpleHost()
@@ -261,13 +229,22 @@
base::Bind(&SimpleHost::OnAuthFailed, base::Unretained(this))));
if (fake_) {
- desktop_environment_factory_.reset(new FakeDesktopEnvironmentFactory());
+ scoped_ptr<VideoFrameCapturer> capturer(new VideoFrameCapturerFake());
+ scoped_ptr<EventExecutor> event_executor = EventExecutor::Create(
+ context_.desktop_task_runner(),
+ context_.ui_task_runner());
+ scoped_ptr<AudioCapturer> audio_capturer(NULL);
+ desktop_environment_ = DesktopEnvironment::CreateFake(
+ &context_,
+ capturer.Pass(),
+ event_executor.Pass(),
+ audio_capturer.Pass());
} else {
- desktop_environment_factory_.reset(new DesktopEnvironmentFactory());
+ desktop_environment_ = DesktopEnvironment::Create(&context_);
}
host_ = new ChromotingHost(
- &context_, signal_strategy_.get(), desktop_environment_factory_.get(),
+ &context_, signal_strategy_.get(), desktop_environment_.get(),
CreateHostSessionManager(network_settings_,
context_.url_request_context_getter()));
@@ -354,10 +331,10 @@
std::string xmpp_auth_token_;
std::string xmpp_auth_service_;
- scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
scoped_ptr<XmppSignalStrategy> signal_strategy_;
scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker_;
scoped_ptr<SignalingConnector> signaling_connector_;
+ scoped_ptr<DesktopEnvironment> desktop_environment_;
scoped_ptr<LogToServer> log_to_server_;
scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_;
scoped_ptr<RegisterSupportHostRequest> register_request_;
« no previous file with comments | « remoting/host/session_event_executor_win.cc ('k') | remoting/host/win/session_desktop_environment_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698