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

Unified Diff: remoting/host/event_executor_mac.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 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
« no previous file with comments | « remoting/host/event_executor_linux.cc ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/event_executor_mac.cc
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index c5b1dddb8377005d921955a8515b6179a3c77d96..21a31b7121a8e1cae9298193299fadd323fd647c 100644
--- a/remoting/host/event_executor_mac.cc
+++ b/remoting/host/event_executor_mac.cc
@@ -57,9 +57,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_;
@@ -214,12 +214,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;
@@ -228,16 +228,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
« no previous file with comments | « remoting/host/event_executor_linux.cc ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698