forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remote assistance on Chrome OS Part VIII - Compile on Ozone
This CL makes It2Me host compile on platforms that uses Ozone. It replaces the X11-based LocalInputMonitor, MouseCursorMonitor and InputInjector with placeholder implementations for Chrome OS. An actual implementation is provided for the LocalInputMonitor with code ported from https://codereview.chromium.org/652293003/. BUG=431876 Review URL: https://codereview.chromium.org/700333007 Cr-Commit-Position: refs/heads/master@{#303971}
- Loading branch information
kelvinp
authored and
Commit bot
committed
Nov 13, 2014
1 parent
fe48afd
commit 18ffa03
Showing
19 changed files
with
447 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "remoting/host/chromeos/mouse_cursor_monitor_aura.h" | ||
|
||
#include "base/logging.h" | ||
|
||
namespace remoting { | ||
|
||
MouseCursorMonitorAura::MouseCursorMonitorAura( | ||
const webrtc::DesktopCaptureOptions& options) | ||
: callback_(nullptr), | ||
mode_(SHAPE_AND_POSITION) { | ||
} | ||
|
||
MouseCursorMonitorAura::~MouseCursorMonitorAura() { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void MouseCursorMonitorAura::Init(Callback* callback, Mode mode) { | ||
DCHECK(!callback_); | ||
DCHECK(callback); | ||
|
||
callback_ = callback; | ||
mode_ = mode; | ||
|
||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void MouseCursorMonitorAura::Capture() { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
} // namespace remoting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_ | ||
#define REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_ | ||
|
||
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | ||
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | ||
|
||
namespace remoting { | ||
|
||
// A MouseCursorMonitor place holder implementation for Chrome OS with ozone. | ||
// TODO(kelvinp): Implement this (See crbug.com/431457). | ||
class MouseCursorMonitorAura : public webrtc::MouseCursorMonitor { | ||
public: | ||
explicit MouseCursorMonitorAura(const webrtc::DesktopCaptureOptions& options); | ||
~MouseCursorMonitorAura() override; | ||
|
||
void Init(Callback* callback, Mode mode) override; | ||
void Capture() override; | ||
|
||
private: | ||
Callback* callback_; | ||
Mode mode_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(MouseCursorMonitorAura); | ||
}; | ||
|
||
} // namespace remoting | ||
|
||
#endif // REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "remoting/host/input_injector_chromeos.h" | ||
|
||
#include "base/logging.h" | ||
#include "remoting/proto/internal.pb.h" | ||
|
||
namespace remoting { | ||
|
||
using protocol::ClipboardEvent; | ||
using protocol::KeyEvent; | ||
using protocol::MouseEvent; | ||
using protocol::TextEvent; | ||
|
||
// TODO(kelvinp): Implement this class (See crbug.com/426716). | ||
InputInjectorChromeos::InputInjectorChromeos( | ||
scoped_refptr<base::SingleThreadTaskRunner> task_runner) | ||
: input_task_runner_(task_runner) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
InputInjectorChromeos::~InputInjectorChromeos() { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void InputInjectorChromeos::InjectClipboardEvent(const ClipboardEvent& event) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void InputInjectorChromeos::InjectKeyEvent(const KeyEvent& event) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void InputInjectorChromeos::InjectTextEvent(const TextEvent& event) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void InputInjectorChromeos::InjectMouseEvent(const MouseEvent& event) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void InputInjectorChromeos::Start( | ||
scoped_ptr<protocol::ClipboardStub> client_clipboard) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
// static | ||
scoped_ptr<InputInjector> InputInjector::Create( | ||
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | ||
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | ||
scoped_ptr<InputInjectorChromeos> injector(new InputInjectorChromeos( | ||
ui_task_runner)); | ||
return injector.Pass(); | ||
} | ||
|
||
} // namespace remoting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_ | ||
#define REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_ | ||
|
||
#include "base/single_thread_task_runner.h" | ||
#include "remoting/host/input_injector.h" | ||
|
||
namespace remoting { | ||
|
||
// InputInjector implementation that translates input to ui::Events and passes | ||
// them to a supplied delegate for injection into ChromeOS. | ||
class InputInjectorChromeos : public InputInjector { | ||
public: | ||
explicit InputInjectorChromeos( | ||
scoped_refptr<base::SingleThreadTaskRunner> task_runner); | ||
|
||
~InputInjectorChromeos() override; | ||
|
||
// Clipboard stub interface. | ||
void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; | ||
|
||
// InputStub interface. | ||
void InjectKeyEvent(const protocol::KeyEvent& event) override; | ||
void InjectTextEvent(const protocol::TextEvent& event) override; | ||
void InjectMouseEvent(const protocol::MouseEvent& event) override; | ||
|
||
// InputInjector interface. | ||
void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; | ||
|
||
private: | ||
// Task runner for input injection. | ||
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(InputInjectorChromeos); | ||
}; | ||
|
||
} // namespace remoting | ||
|
||
#endif // REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_ |
Oops, something went wrong.