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

Unified Diff: content/shell/renderer/test_runner/mock_screen_orientation_client.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: content/shell/renderer/test_runner/mock_screen_orientation_client.cc
diff --git a/content/shell/renderer/test_runner/mock_screen_orientation_client.cc b/content/shell/renderer/test_runner/mock_screen_orientation_client.cc
index 04b471096654da64f5ca4077ffadad59419533a3..56dd73c696f8966483864628cf9da051459f6905 100644
--- a/content/shell/renderer/test_runner/mock_screen_orientation_client.cc
+++ b/content/shell/renderer/test_runner/mock_screen_orientation_client.cc
@@ -5,8 +5,10 @@
#include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
namespace content {
@@ -109,19 +111,15 @@ bool MockScreenOrientationClient::IsOrientationAllowedByCurrentLock(
void MockScreenOrientationClient::lockOrientation(
blink::WebScreenOrientationLockType orientation,
blink::WebLockOrientationCallback* callback) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockScreenOrientationClient::UpdateLockSync,
- base::Unretained(this),
- orientation,
- callback));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&MockScreenOrientationClient::UpdateLockSync,
+ base::Unretained(this), orientation, callback));
}
void MockScreenOrientationClient::unlockOrientation() {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockScreenOrientationClient::ResetLockSync,
- base::Unretained(this)));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&MockScreenOrientationClient::ResetLockSync,
+ base::Unretained(this)));
}
void MockScreenOrientationClient::UpdateLockSync(

Powered by Google App Engine
This is Rietveld 408576698