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

Unified Diff: remoting/host/event_executor_mac.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_mac.cc
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index 47320f91369acff786c12ca1fd4b1ea43fe24f8c..66b6206b63c532546c61e484e287ecb8b89d3d15 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_;
@@ -404,12 +404,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;
@@ -418,16 +418,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