2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "libcef/browser/browser_message_loop.h"
|
2013-02-23 01:43:28 +01:00
|
|
|
#include "base/run_loop.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-02-23 01:43:28 +01:00
|
|
|
CefBrowserMessageLoop::CefBrowserMessageLoop() {
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CefBrowserMessageLoop::~CefBrowserMessageLoop() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
CefBrowserMessageLoop* CefBrowserMessageLoop::current() {
|
2013-04-16 00:16:01 +02:00
|
|
|
base::MessageLoop* loop = base::MessageLoop::current();
|
|
|
|
DCHECK_EQ(base::MessageLoop::TYPE_UI, loop->type());
|
2012-04-03 03:34:16 +02:00
|
|
|
return static_cast<CefBrowserMessageLoop*>(loop);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserMessageLoop::DoMessageLoopIteration() {
|
2013-02-23 01:43:28 +01:00
|
|
|
base::RunLoop run_loop;
|
|
|
|
run_loop.RunUntilIdle();
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserMessageLoop::RunMessageLoop() {
|
2013-02-23 01:43:28 +01:00
|
|
|
Run();
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|