summaryrefslogtreecommitdiffstats
path: root/remoting/host/event_executor_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/event_executor_win.cc')
-rw-r--r--remoting/host/event_executor_win.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index cede6d8..00a7a24 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() {