summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 04:17:22 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 04:17:22 +0000
commitc9c0d079c24a02f8f9b667f3cbf06d234a586625 (patch)
tree3190175cc6bd419a1f36d3a9265c1c61e1ba9884 /remoting/host
parent0c12ed8f62b3691f1fee9e5abd6b6bc2fa5af14a (diff)
downloadchromium_src-c9c0d079c24a02f8f9b667f3cbf06d234a586625.zip
chromium_src-c9c0d079c24a02f8f9b667f3cbf06d234a586625.tar.gz
chromium_src-c9c0d079c24a02f8f9b667f3cbf06d234a586625.tar.bz2
Move media library AutoTaskRunner to base and rename ScopedTaskRunner.
This is needed to avoid faux dependencies on media/ creeping in to remoting/ code, and creating linker issues. BUG= TEST=Everything works as before. Review URL: http://codereview.chromium.org/7062013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/client_session.cc15
-rw-r--r--remoting/host/event_executor_linux.cc9
-rw-r--r--remoting/host/event_executor_mac.cc5
-rw-r--r--remoting/host/event_executor_win.cc8
-rw-r--r--remoting/host/screen_recorder.cc5
5 files changed, 18 insertions, 24 deletions
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 297ee00..1aae53c 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -5,7 +5,6 @@
#include "remoting/host/client_session.h"
#include "base/task.h"
-#include "media/base/callback.h"
#include "remoting/host/user_authenticator.h"
#include "remoting/proto/auth.pb.h"
@@ -28,7 +27,7 @@ ClientSession::~ClientSession() {
void ClientSession::SuggestResolution(
const protocol::SuggestResolutionRequest* msg, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (!authenticated_) {
LOG(WARNING) << "Invalid control message received "
@@ -41,7 +40,7 @@ void ClientSession::BeginSessionRequest(
const protocol::LocalLoginCredentials* credentials, Task* done) {
DCHECK(event_handler_);
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
bool success = false;
switch (credentials->type()) {
@@ -70,19 +69,17 @@ void ClientSession::OnAuthorizationComplete(bool success) {
void ClientSession::InjectKeyEvent(const protocol::KeyEvent* event,
Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (authenticated_) {
- done_runner.release();
- input_stub_->InjectKeyEvent(event, done);
+ input_stub_->InjectKeyEvent(event, done_runner.Release());
}
}
void ClientSession::InjectMouseEvent(const protocol::MouseEvent* event,
Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (authenticated_) {
- done_runner.release();
- input_stub_->InjectMouseEvent(event, done);
+ input_stub_->InjectMouseEvent(event, done_runner.Release());
}
}
diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc
index 2b632c9..e01aede 100644
--- a/remoting/host/event_executor_linux.cc
+++ b/remoting/host/event_executor_linux.cc
@@ -14,7 +14,6 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/task.h"
-#include "media/base/callback.h"
#include "remoting/proto/internal.pb.h"
namespace remoting {
@@ -278,13 +277,13 @@ bool EventExecutorLinux::Init() {
}
void EventExecutorLinux::InjectKeyEvent(const KeyEvent* event, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this, &EventExecutorLinux::InjectKeyEvent,
- event, done_runner.release()));
+ event, done_runner.Release()));
return;
}
@@ -313,13 +312,13 @@ void EventExecutorLinux::InjectKeyEvent(const KeyEvent* event, Task* done) {
void EventExecutorLinux::InjectMouseEvent(const MouseEvent* event,
Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this, &EventExecutorLinux::InjectMouseEvent,
- event, done_runner.release()));
+ event, done_runner.Release()));
return;
}
diff --git a/remoting/host/event_executor_mac.cc b/remoting/host/event_executor_mac.cc
index a197bf6..4c65c28 100644
--- a/remoting/host/event_executor_mac.cc
+++ b/remoting/host/event_executor_mac.cc
@@ -12,7 +12,6 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/message_loop.h"
#include "base/task.h"
-#include "media/base/callback.h"
#include "remoting/host/capturer.h"
#include "remoting/proto/internal.pb.h"
#include "remoting/protocol/message_decoder.h"
@@ -215,7 +214,7 @@ const int kUsVkeyToKeysym[256] = {
};
void EventExecutorMac::InjectKeyEvent(const KeyEvent* event, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
int key_code = event->keycode();
if (key_code >= 0 && key_code < 256) {
@@ -251,7 +250,7 @@ void EventExecutorMac::InjectKeyEvent(const KeyEvent* event, Task* done) {
}
void EventExecutorMac::InjectMouseEvent(const MouseEvent* event, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (event->has_x() && event->has_y()) {
// TODO(wez): Checking the validity of the MouseEvent should be done in core
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index 6eb2c9b..2f7e737 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -46,13 +46,13 @@ EventExecutorWin::EventExecutorWin(MessageLoop* message_loop,
}
void EventExecutorWin::InjectKeyEvent(const KeyEvent* event, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this, &EventExecutorWin::InjectKeyEvent,
- event, done_runner.release()));
+ event, done_runner.Release()));
return;
}
@@ -60,13 +60,13 @@ void EventExecutorWin::InjectKeyEvent(const KeyEvent* event, Task* done) {
}
void EventExecutorWin::InjectMouseEvent(const MouseEvent* event, Task* done) {
- media::AutoTaskRunner done_runner(done);
+ base::ScopedTaskRunner done_runner(done);
if (MessageLoop::current() != message_loop_) {
message_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this, &EventExecutorWin::InjectMouseEvent,
- event, done_runner.release()));
+ event, done_runner.Release()));
return;
}
diff --git a/remoting/host/screen_recorder.cc b/remoting/host/screen_recorder.cc
index 38b9932..7533b5f 100644
--- a/remoting/host/screen_recorder.cc
+++ b/remoting/host/screen_recorder.cc
@@ -11,7 +11,6 @@
#include "base/stl_util-inl.h"
#include "base/task.h"
#include "base/time.h"
-#include "media/base/callback.h"
#include "remoting/base/capture_data.h"
#include "remoting/base/tracer.h"
#include "remoting/proto/control.pb.h"
@@ -151,7 +150,7 @@ void ScreenRecorder::DoStart() {
void ScreenRecorder::DoStop(Task* done_task) {
DCHECK_EQ(capture_loop_, MessageLoop::current());
- media::AutoTaskRunner done_runner(done_task);
+ base::ScopedTaskRunner done_runner(done_task);
// We might have not started when we receive a stop command, simply run the
// task and then return.
@@ -167,7 +166,7 @@ void ScreenRecorder::DoStop(Task* done_task) {
FROM_HERE,
NewTracedMethod(this,
&ScreenRecorder::DoStopOnNetworkThread,
- done_runner.release()));
+ done_runner.Release()));
return;
}
}