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

Unified Diff: remoting/host/win/session_event_executor.cc

Issue 10915206: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased to enable try jobs. 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/win/session_event_executor.cc
diff --git a/remoting/host/session_event_executor_win.cc b/remoting/host/win/session_event_executor.cc
similarity index 92%
rename from remoting/host/session_event_executor_win.cc
rename to remoting/host/win/session_event_executor.cc
index 9fc28349e8e53ec3c7e671b40bce609d6e931c5d..027aef0ad172b889318d28bb09dbad2e6c8b0ee6 100644
--- a/remoting/host/session_event_executor_win.cc
+++ b/remoting/host/win/session_event_executor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/host/session_event_executor_win.h"
+#include "remoting/host/win/session_event_executor.h"
#include <string>
@@ -56,29 +56,30 @@ SessionEventExecutorWin::SessionEventExecutorWin(
SessionEventExecutorWin::~SessionEventExecutorWin() {
}
-void SessionEventExecutorWin::OnSessionStarted(
+void SessionEventExecutorWin::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&SessionEventExecutorWin::OnSessionStarted,
+ base::Bind(&SessionEventExecutorWin::Start,
weak_ptr_, base::Passed(&client_clipboard)));
return;
}
- nested_executor_->OnSessionStarted(client_clipboard.Pass());
+ nested_executor_->Start(client_clipboard.Pass());
}
-void SessionEventExecutorWin::OnSessionFinished() {
+void SessionEventExecutorWin::StopAndDelete() {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&SessionEventExecutorWin::OnSessionFinished,
+ base::Bind(&SessionEventExecutorWin::StopAndDelete,
weak_ptr_));
return;
}
- nested_executor_->OnSessionFinished();
+ nested_executor_.release()->StopAndDelete();
+ delete this;
}
void SessionEventExecutorWin::InjectClipboardEvent(

Powered by Google App Engine
This is Rietveld 408576698