2015-01-22 18:55:55 +01:00
|
|
|
// Copyright (c) 2015 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.
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#include "tests/shared/browser/main_message_loop_std.h"
|
2015-01-22 18:55:55 +01:00
|
|
|
|
|
|
|
#include "include/cef_app.h"
|
|
|
|
|
|
|
|
namespace client {
|
|
|
|
|
2024-01-20 03:22:56 +01:00
|
|
|
MainMessageLoopStd::MainMessageLoopStd() = default;
|
2015-01-22 18:55:55 +01:00
|
|
|
|
|
|
|
int MainMessageLoopStd::Run() {
|
|
|
|
CefRunMessageLoop();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainMessageLoopStd::Quit() {
|
|
|
|
CefQuitMessageLoop();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainMessageLoopStd::PostTask(CefRefPtr<CefTask> task) {
|
|
|
|
CefPostTask(TID_UI, task);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool MainMessageLoopStd::RunsTasksOnCurrentThread() const {
|
|
|
|
return CefCurrentlyOn(TID_UI);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
void MainMessageLoopStd::SetCurrentModelessDialog(HWND hWndDialog) {
|
|
|
|
// Nothing to do here. The Chromium message loop implementation will
|
|
|
|
// internally route dialog messages.
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace client
|