Commit ffbcf31d authored by spang's avatar spang Committed by Commit bot

Revert of Fix breaking change in It2me Host on Ozone (patchset #2 id:20001 of...

Revert of Fix breaking change in It2me Host on Ozone (patchset #2 id:20001 of https://codereview.chromium.org/931393003/)

Reason for revert:
does not compile

Original issue's description:
> Fix breaking change in It2me Host on Ozone
>
> Due to a recent threading changes, the Ozone SystemInputInjector must be
> created on the UI thread.
>
> This CL moves the creation of the input injector and input controller on
> to the browser UI thread.
>
> BUG=458314
>
> Committed: https://crrev.com/9c59eedd7720845a5bc93b6dbc72639305c52ea7
> Cr-Commit-Position: refs/heads/master@{#316883}

TBR=sergeyu@chromium.org,kelvinp@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=458314

Review URL: https://codereview.chromium.org/932233002

Cr-Commit-Position: refs/heads/master@{#316898}
parent 3589edc6
......@@ -74,7 +74,13 @@ class InputInjectorChromeos::Core {
DISALLOW_COPY_AND_ASSIGN(Core);
};
InputInjectorChromeos::Core::Core() : saved_auto_repeat_enabled_(false) {
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_);
}
void InputInjectorChromeos::Core::InjectClipboardEvent(
......@@ -150,13 +156,6 @@ 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());
......@@ -165,7 +164,9 @@ void InputInjectorChromeos::Core::Start(
InputInjectorChromeos::InputInjectorChromeos(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: input_task_runner_(task_runner) {
core_.reset(new Core());
ui::OzonePlatform* ozone_platform = ui::OzonePlatform::GetInstance();
core_.reset(new Core(ozone_platform->CreateSystemInputInjector(),
ozone_platform->GetInputController()));
}
InputInjectorChromeos::~InputInjectorChromeos() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment