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

Unified Diff: components/test_runner/mock_screen_orientation_client.cc

Issue 2082333002: Remove calls to deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: components/test_runner/mock_screen_orientation_client.cc
diff --git a/components/test_runner/mock_screen_orientation_client.cc b/components/test_runner/mock_screen_orientation_client.cc
index 1839281e0be81241b0f6e3e6408bd59b4c99ca71..dd432329282d3f6752a75b225094df8761235668 100644
--- a/components/test_runner/mock_screen_orientation_client.cc
+++ b/components/test_runner/mock_screen_orientation_client.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
namespace test_runner {
@@ -115,19 +116,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::MessageLoop::current()->task_runner()->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::MessageLoop::current()->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&MockScreenOrientationClient::ResetLockSync,
+ base::Unretained(this)));
}
void MockScreenOrientationClient::UpdateLockSync(

Powered by Google App Engine
This is Rietveld 408576698