| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_chromeos.h" | 5 #include "remoting/host/input_injector_chromeos.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> |
| 8 | 9 |
| 9 #include "base/bind.h" | 10 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 12 #include "base/location.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "remoting/host/chromeos/point_transformer.h" | 14 #include "remoting/host/chromeos/point_transformer.h" |
| 14 #include "remoting/host/clipboard.h" | 15 #include "remoting/host/clipboard.h" |
| 15 #include "remoting/proto/internal.pb.h" | 16 #include "remoting/proto/internal.pb.h" |
| 16 #include "ui/events/keycodes/dom/dom_code.h" | 17 #include "ui/events/keycodes/dom/dom_code.h" |
| 17 #include "ui/events/keycodes/dom/keycode_converter.h" | 18 #include "ui/events/keycodes/dom/keycode_converter.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 111 } |
| 111 | 112 |
| 112 void InputInjectorChromeos::Core::Start( | 113 void InputInjectorChromeos::Core::Start( |
| 113 scoped_ptr<protocol::ClipboardStub> client_clipboard) { | 114 scoped_ptr<protocol::ClipboardStub> client_clipboard) { |
| 114 ui::OzonePlatform* ozone_platform = ui::OzonePlatform::GetInstance(); | 115 ui::OzonePlatform* ozone_platform = ui::OzonePlatform::GetInstance(); |
| 115 delegate_ = ozone_platform->CreateSystemInputInjector(); | 116 delegate_ = ozone_platform->CreateSystemInputInjector(); |
| 116 DCHECK(delegate_); | 117 DCHECK(delegate_); |
| 117 | 118 |
| 118 // Implemented by remoting::ClipboardAura. | 119 // Implemented by remoting::ClipboardAura. |
| 119 clipboard_ = Clipboard::Create(); | 120 clipboard_ = Clipboard::Create(); |
| 120 clipboard_->Start(client_clipboard.Pass()); | 121 clipboard_->Start(std::move(client_clipboard)); |
| 121 point_transformer_.reset(new PointTransformer()); | 122 point_transformer_.reset(new PointTransformer()); |
| 122 } | 123 } |
| 123 | 124 |
| 124 InputInjectorChromeos::InputInjectorChromeos( | 125 InputInjectorChromeos::InputInjectorChromeos( |
| 125 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 126 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
| 126 : input_task_runner_(task_runner) { | 127 : input_task_runner_(task_runner) { |
| 127 core_.reset(new Core()); | 128 core_.reset(new Core()); |
| 128 } | 129 } |
| 129 | 130 |
| 130 InputInjectorChromeos::~InputInjectorChromeos() { | 131 InputInjectorChromeos::~InputInjectorChromeos() { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // browser process. | 175 // browser process. |
| 175 return make_scoped_ptr(new InputInjectorChromeos(ui_task_runner)); | 176 return make_scoped_ptr(new InputInjectorChromeos(ui_task_runner)); |
| 176 } | 177 } |
| 177 | 178 |
| 178 // static | 179 // static |
| 179 bool InputInjector::SupportsTouchEvents() { | 180 bool InputInjector::SupportsTouchEvents() { |
| 180 return false; | 181 return false; |
| 181 } | 182 } |
| 182 | 183 |
| 183 } // namespace remoting | 184 } // namespace remoting |
| OLD | NEW |