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

Unified Diff: remoting/host/input_injector_chromeos.cc

Issue 931393003: Fix breaking change in It2me Host on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile failure Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/input_injector_chromeos.cc
diff --git a/remoting/host/input_injector_chromeos.cc b/remoting/host/input_injector_chromeos.cc
index c58110a7f9ff51eda6786317dff4126e690a721b..4cc7ae0b7edbadf7872ff05b62d381de42dd028e 100644
--- a/remoting/host/input_injector_chromeos.cc
+++ b/remoting/host/input_injector_chromeos.cc
@@ -46,8 +46,7 @@ ui::EventFlags MouseButtonToUIFlags(MouseEvent::MouseButton button) {
// This class is run exclusively on the UI thread of the browser process.
class InputInjectorChromeos::Core {
public:
- Core(scoped_ptr<ui::SystemInputInjector> delegate_,
- ui::InputController* input_controller);
+ Core();
// Mirrors the public InputInjectorChromeos interface.
void InjectClipboardEvent(const ClipboardEvent& event);
@@ -74,13 +73,7 @@ class InputInjectorChromeos::Core {
DISALLOW_COPY_AND_ASSIGN(Core);
};
-InputInjectorChromeos::Core::Core(scoped_ptr<ui::SystemInputInjector> delegate,
- ui::InputController* input_controller)
- : delegate_(delegate.Pass()),
- input_controller_(input_controller),
- saved_auto_repeat_enabled_(false) {
- DCHECK(delegate_);
- DCHECK(input_controller_);
+InputInjectorChromeos::Core::Core() : saved_auto_repeat_enabled_(false) {
}
void InputInjectorChromeos::Core::InjectClipboardEvent(
@@ -156,6 +149,13 @@ void InputInjectorChromeos::Core::InjectMouseEvent(const MouseEvent& event) {
void InputInjectorChromeos::Core::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
+ ui::OzonePlatform* ozone_platform = ui::OzonePlatform::GetInstance();
+ delegate_ = ozone_platform->CreateSystemInputInjector();
+ DCHECK(delegate_);
+ input_controller_ = ozone_platform->GetInputController();
+ DCHECK(input_controller_);
+
+ // Implemented by remoting::ClipboardAura.
clipboard_ = Clipboard::Create();
clipboard_->Start(client_clipboard.Pass());
point_transformer_.reset(new PointTransformer());
@@ -164,9 +164,7 @@ void InputInjectorChromeos::Core::Start(
InputInjectorChromeos::InputInjectorChromeos(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: input_task_runner_(task_runner) {
- ui::OzonePlatform* ozone_platform = ui::OzonePlatform::GetInstance();
- core_.reset(new Core(ozone_platform->CreateSystemInputInjector(),
- ozone_platform->GetInputController()));
+ core_.reset(new Core());
}
InputInjectorChromeos::~InputInjectorChromeos() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698