1 // Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 5 #include "tests/shared/browser/main_message_loop_std.h" 6 7 #include "include/cef_app.h" 8 9 namespace client { 10 MainMessageLoopStd()11MainMessageLoopStd::MainMessageLoopStd() {} 12 Run()13int MainMessageLoopStd::Run() { 14 CefRunMessageLoop(); 15 return 0; 16 } 17 Quit()18void MainMessageLoopStd::Quit() { 19 CefQuitMessageLoop(); 20 } 21 PostTask(CefRefPtr<CefTask> task)22void MainMessageLoopStd::PostTask(CefRefPtr<CefTask> task) { 23 CefPostTask(TID_UI, task); 24 } 25 RunsTasksOnCurrentThread() const26bool MainMessageLoopStd::RunsTasksOnCurrentThread() const { 27 return CefCurrentlyOn(TID_UI); 28 } 29 30 #if defined(OS_WIN) SetCurrentModelessDialog(HWND hWndDialog)31void MainMessageLoopStd::SetCurrentModelessDialog(HWND hWndDialog) { 32 // Nothing to do here. The Chromium message loop implementation will 33 // internally route dialog messages. 34 } 35 #endif 36 37 } // namespace client 38