summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/ozone/dri/dri_surface_factory.cc2
-rw-r--r--ui/gfx/win/singleton_hwnd.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/ui/gfx/ozone/dri/dri_surface_factory.cc b/ui/gfx/ozone/dri/dri_surface_factory.cc
index 4db10cf..3ce7bf1 100644
--- a/ui/gfx/ozone/dri/dri_surface_factory.cc
+++ b/ui/gfx/ozone/dri/dri_surface_factory.cc
@@ -203,7 +203,7 @@ bool DriSurfaceFactory::SchedulePageFlip(gfx::AcceleratedWidget w) {
CHECK(state_ == INITIALIZED);
// TODO(dnicoara) Change this CHECK once we're running with the threaded
// compositor.
- CHECK(base::MessageLoop::current()->type() == base::MessageLoop::TYPE_UI);
+ CHECK(base::MessageLoopForUI::IsCurrent());
// TODO(dnicoara) Once we can handle multiple displays this needs to be
// changed.
diff --git a/ui/gfx/win/singleton_hwnd.cc b/ui/gfx/win/singleton_hwnd.cc
index 2de6a8b..fc4d11f 100644
--- a/ui/gfx/win/singleton_hwnd.cc
+++ b/ui/gfx/win/singleton_hwnd.cc
@@ -37,8 +37,7 @@ BOOL SingletonHwnd::ProcessWindowMessage(HWND window,
}
SingletonHwnd::SingletonHwnd() {
- if (!base::MessageLoop::current() ||
- base::MessageLoop::current()->type() != base::MessageLoop::TYPE_UI) {
+ if (!base::MessageLoopForUI::IsCurrent()) {
// Creating this window in (e.g.) a renderer inhibits shutdown on
// Windows. See http://crbug.com/230122 and http://crbug.com/236039.
DLOG(ERROR) << "Cannot create windows on non-UI thread!";