2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 09:49:37 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-30 15:56:50 +00:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 00:30:26 +00:00
|
|
|
#include "atom/browser/atom_javascript_dialog_manager.h"
|
2013-04-30 15:56:50 +00:00
|
|
|
|
2014-03-16 01:13:06 +00:00
|
|
|
#include <string>
|
|
|
|
|
2013-12-11 07:48:19 +00:00
|
|
|
#include "base/strings/utf_string_conversions.h"
|
2013-04-30 15:56:50 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2014-03-01 11:53:50 +00:00
|
|
|
void AtomJavaScriptDialogManager::RunJavaScriptDialog(
|
|
|
|
content::WebContents* web_contents,
|
|
|
|
const GURL& origin_url,
|
|
|
|
content::JavaScriptMessageType javascript_message_type,
|
2014-06-28 11:36:57 +00:00
|
|
|
const base::string16& message_text,
|
|
|
|
const base::string16& default_prompt_text,
|
2014-03-01 11:53:50 +00:00
|
|
|
const DialogClosedCallback& callback,
|
|
|
|
bool* did_suppress_message) {
|
2014-06-28 11:36:57 +00:00
|
|
|
callback.Run(false, base::string16());
|
2014-03-01 11:53:50 +00:00
|
|
|
}
|
|
|
|
|
2013-04-30 15:56:50 +00:00
|
|
|
void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
|
|
|
|
content::WebContents* web_contents,
|
|
|
|
bool is_reload,
|
|
|
|
const DialogClosedCallback& callback) {
|
2016-05-23 01:59:39 +00:00
|
|
|
// FIXME(zcbenz): the |message_text| is removed, figure out what should we do.
|
2016-05-23 04:28:16 +00:00
|
|
|
callback.Run(false, base::ASCIIToUTF16("This should not be displayed"));
|
2013-04-30 15:56:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace atom
|