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

Unified Diff: ui/base/test/scoped_fake_nswindow_fullscreen.mm

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/RunAllTests.cpp ('k') | ui/base/test/ui_controls_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/test/scoped_fake_nswindow_fullscreen.mm
diff --git a/ui/base/test/scoped_fake_nswindow_fullscreen.mm b/ui/base/test/scoped_fake_nswindow_fullscreen.mm
index 0dc9db7d262c699dba8bde548c3392d8520d37ea..c98641fc8e916f939970a82fb67ce1ab6c0bf81c 100644
--- a/ui/base/test/scoped_fake_nswindow_fullscreen.mm
+++ b/ui/base/test/scoped_fake_nswindow_fullscreen.mm
@@ -15,6 +15,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/threading/thread_task_runner_handle.h"
// This method exists on NSWindowDelegate on 10.7+.
// To build on 10.6, we just need to declare it somewhere. We'll test
@@ -116,7 +117,8 @@ class ScopedFakeNSWindowFullscreen::Impl {
[[NSNotificationCenter defaultCenter]
postNotificationName:NSWindowWillStartLiveResizeNotification
object:window];
- base::MessageLoopForUI::current()->PostTask(
+ DCHECK(base::MessageLoopForUI::IsCurrent());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&Impl::FinishEnterFullscreen,
base::Unretained(this), fullscreen_content_size));
}
@@ -154,7 +156,8 @@ class ScopedFakeNSWindowFullscreen::Impl {
postNotificationName:NSWindowWillExitFullScreenNotification
object:window_];
- base::MessageLoopForUI::current()->PostTask(
+ DCHECK(base::MessageLoopForUI::IsCurrent());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&Impl::FinishExitFullscreen, base::Unretained(this)));
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/RunAllTests.cpp ('k') | ui/base/test/ui_controls_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698