mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 0bfd25d4 (#381305)
- Delete include/cef_runnable.h (issue #1336). - Build the cef_unittests target using all Chromium headers. Add a USING_CHROMIUM_INCLUDES define and libcef_dll_wrapper_unittests target to support this. This change avoids compile errors due to the divergence of CEF and Chromium base/ header implementations. The libcef_dll_wrapper sources must now compile successfully with both CEF and Chromium base/ headers (issue #1632). - The onbeforeunload message specified via JavaScript is no longer passed to the client (see http://crbug.com/587940).
This commit is contained in:
@ -14,7 +14,6 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "components/url_formatter/elide_url.h"
|
||||
#include "net/base/net_util.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@ -148,7 +147,6 @@ void CefJavaScriptDialogManager::RunJavaScriptDialog(
|
||||
|
||||
void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
|
||||
content::WebContents* web_contents,
|
||||
const base::string16& message_text,
|
||||
bool is_reload,
|
||||
const DialogClosedCallback& callback) {
|
||||
if (browser_->destruction_state() >=
|
||||
@ -159,6 +157,9 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
|
||||
return;
|
||||
}
|
||||
|
||||
const base::string16& message_text =
|
||||
base::ASCIIToUTF16("Is it OK to leave/reload this page?");
|
||||
|
||||
CefRefPtr<CefClient> client = browser_->GetClient();
|
||||
if (client.get()) {
|
||||
CefRefPtr<CefJSDialogHandler> handler = client->GetJSDialogHandler();
|
||||
@ -187,14 +188,10 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
|
||||
|
||||
dialog_running_ = true;
|
||||
|
||||
base::string16 new_message_text =
|
||||
message_text +
|
||||
base::ASCIIToUTF16("\n\nIs it OK to leave/reload this page?");
|
||||
|
||||
runner_->Run(browser_,
|
||||
content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM,
|
||||
base::string16(), // display_url
|
||||
new_message_text,
|
||||
message_text,
|
||||
base::string16(), // default_prompt_text
|
||||
base::Bind(&CefJavaScriptDialogManager::DialogClosed,
|
||||
weak_ptr_factory_.GetWeakPtr(), callback));
|
||||
|
Reference in New Issue
Block a user