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

Unified Diff: remoting/host/desktop_environment.cc

Issue 9617027: Chromoting: Implemented security attention sequence (SAS) emulation on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/event_executor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_environment.cc
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc
index fbf4ffc19785745de90647b6a209b2dad774f400..b2a56189ea5ab300b177621421729a54c84fcb66 100644
--- a/remoting/host/desktop_environment.cc
+++ b/remoting/host/desktop_environment.cc
@@ -11,31 +11,57 @@
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/event_executor.h"
+#if defined(OS_WIN)
+#include "remoting/host/session_event_executor_win.h"
+#endif
+
namespace remoting {
// static
-DesktopEnvironment* DesktopEnvironment::Create(ChromotingHostContext* context) {
+scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create(
+ ChromotingHostContext* context) {
scoped_ptr<Capturer> capturer(Capturer::Create());
- scoped_ptr<EventExecutor> event_executor(
- EventExecutor::Create(context->desktop_message_loop(), capturer.get()));
+ scoped_ptr<protocol::InputStub> event_executor =
+ EventExecutor::Create(context->desktop_message_loop(),
+ capturer.get());
if (capturer.get() == NULL || event_executor.get() == NULL) {
LOG(ERROR) << "Unable to create DesktopEnvironment";
- return NULL;
+ return scoped_ptr<DesktopEnvironment>();
}
- return new DesktopEnvironment(context,
- capturer.release(),
- event_executor.release());
+#if defined(OS_WIN)
+ event_executor.reset(new SessionEventExecutorWin(
+ context->desktop_message_loop(),
+ context->io_message_loop(),
+ event_executor.Pass()));
+#endif
+
+ return scoped_ptr<DesktopEnvironment>(
+ new DesktopEnvironment(context,
+ capturer.Pass(),
+ event_executor.Pass()));
+}
+
+// static
+scoped_ptr<DesktopEnvironment> DesktopEnvironment::CreateFake(
+ ChromotingHostContext* context,
+ scoped_ptr<Capturer> capturer,
+ scoped_ptr<protocol::InputStub> event_executor) {
+ return scoped_ptr<DesktopEnvironment>(
+ new DesktopEnvironment(context,
+ capturer.Pass(),
+ event_executor.Pass()));
}
-DesktopEnvironment::DesktopEnvironment(ChromotingHostContext* context,
- Capturer* capturer,
- EventExecutor* event_executor)
+DesktopEnvironment::DesktopEnvironment(
+ ChromotingHostContext* context,
+ scoped_ptr<Capturer> capturer,
+ scoped_ptr<protocol::InputStub> event_executor)
: host_(NULL),
context_(context),
- capturer_(capturer),
- event_executor_(event_executor) {
+ capturer_(capturer.Pass()),
+ event_executor_(event_executor.Pass()) {
}
DesktopEnvironment::~DesktopEnvironment() {
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/event_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698