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

Unified Diff: remoting/host/event_executor_win.cc

Issue 10911152: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed ClientSessionTest.ClampMouseEvents and crash in JingleSessionManager::Close(). 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/event_executor_win.cc
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index cede6d8b8035fc1056c7a84e72486853b83be5fb..00a7a24572387be6fb6db0ece08e8780a9973972 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -44,9 +44,9 @@ class EventExecutorWin : public EventExecutor {
virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE;
// EventExecutor interface.
- virtual void OnSessionStarted(
+ virtual void Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
- virtual void OnSessionFinished() OVERRIDE;
+ virtual void StopAndDelete() OVERRIDE;
private:
HKL GetForegroundKeyboardLayout();
@@ -105,12 +105,12 @@ void EventExecutorWin::InjectMouseEvent(const MouseEvent& event) {
HandleMouse(event);
}
-void EventExecutorWin::OnSessionStarted(
+void EventExecutorWin::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
if (!ui_task_runner_->BelongsToCurrentThread()) {
ui_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&EventExecutorWin::OnSessionStarted,
+ base::Bind(&EventExecutorWin::Start,
base::Unretained(this),
base::Passed(&client_clipboard)));
return;
@@ -119,16 +119,17 @@ void EventExecutorWin::OnSessionStarted(
clipboard_->Start(client_clipboard.Pass());
}
-void EventExecutorWin::OnSessionFinished() {
+void EventExecutorWin::StopAndDelete() {
if (!ui_task_runner_->BelongsToCurrentThread()) {
ui_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&EventExecutorWin::OnSessionFinished,
+ base::Bind(&EventExecutorWin::StopAndDelete,
base::Unretained(this)));
return;
}
clipboard_->Stop();
+ delete this;
}
HKL EventExecutorWin::GetForegroundKeyboardLayout() {

Powered by Google App Engine
This is Rietveld 408576698