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

Unified Diff: remoting/host/event_executor_mac.cc

Issue 10920019: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_mac.cc
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index 971ca510ea6bd563c6e57164516c55785cba433c..69628a340578cf7a199082486434ea05986f75b9 100644
--- a/remoting/host/event_executor_mac.cc
+++ b/remoting/host/event_executor_mac.cc
@@ -45,9 +45,9 @@ class EventExecutorMac : 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:
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
@@ -363,12 +363,12 @@ void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
}
}
-void EventExecutorMac::OnSessionStarted(
+void EventExecutorMac::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&EventExecutorMac::OnSessionStarted,
+ base::Bind(&EventExecutorMac::Start,
base::Unretained(this),
base::Passed(&client_clipboard)));
return;
@@ -377,16 +377,17 @@ void EventExecutorMac::OnSessionStarted(
clipboard_->Start(client_clipboard.Pass());
}
-void EventExecutorMac::OnSessionFinished() {
+void EventExecutorMac::StopAndDelete() {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&EventExecutorMac::OnSessionFinished,
+ base::Bind(&EventExecutorMac::StopAndDelete,
base::Unretained(this)));
return;
}
clipboard_->Stop();
+ delete this;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698