OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/input_injector.h" | 5 #include "remoting/host/input_injector.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 clipboard_->Start(client_clipboard.Pass()); | 321 clipboard_->Start(client_clipboard.Pass()); |
322 } | 322 } |
323 | 323 |
324 void InputInjectorMac::Core::Stop() { | 324 void InputInjectorMac::Core::Stop() { |
325 if (!task_runner_->BelongsToCurrentThread()) { | 325 if (!task_runner_->BelongsToCurrentThread()) { |
326 task_runner_->PostTask(FROM_HERE, base::Bind(&Core::Stop, this)); | 326 task_runner_->PostTask(FROM_HERE, base::Bind(&Core::Stop, this)); |
327 return; | 327 return; |
328 } | 328 } |
329 | 329 |
330 clipboard_->Stop(); | 330 clipboard_.reset(); |
331 } | 331 } |
332 | 332 |
333 InputInjectorMac::Core::~Core() {} | 333 InputInjectorMac::Core::~Core() {} |
334 | 334 |
335 } // namespace | 335 } // namespace |
336 | 336 |
337 scoped_ptr<InputInjector> InputInjector::Create( | 337 scoped_ptr<InputInjector> InputInjector::Create( |
338 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 338 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
339 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 339 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
340 return make_scoped_ptr(new InputInjectorMac(main_task_runner)); | 340 return make_scoped_ptr(new InputInjectorMac(main_task_runner)); |
341 } | 341 } |
342 | 342 |
343 } // namespace remoting | 343 } // namespace remoting |
OLD | NEW |