cefclient: Remove console message alert and update google URLs
This commit is contained in:
parent
7ba45a0451
commit
e646827d92
|
@ -330,13 +330,8 @@ ClientHandler::ClientHandler(Delegate* delegate,
|
||||||
: is_osr_(is_osr),
|
: is_osr_(is_osr),
|
||||||
with_controls_(with_controls),
|
with_controls_(with_controls),
|
||||||
startup_url_(startup_url),
|
startup_url_(startup_url),
|
||||||
download_favicon_images_(false),
|
|
||||||
delegate_(delegate),
|
delegate_(delegate),
|
||||||
browser_count_(0),
|
console_log_file_(MainContext::Get()->GetConsoleLogPath()) {
|
||||||
console_log_file_(MainContext::Get()->GetConsoleLogPath()),
|
|
||||||
first_console_message_(true),
|
|
||||||
focus_on_editable_field_(false),
|
|
||||||
initial_navigation_(true) {
|
|
||||||
DCHECK(!console_log_file_.empty());
|
DCHECK(!console_log_file_.empty());
|
||||||
|
|
||||||
resource_manager_ = new CefResourceManager();
|
resource_manager_ = new CefResourceManager();
|
||||||
|
@ -628,12 +623,6 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||||
<< NEWLINE << "-----------------------" << NEWLINE;
|
<< NEWLINE << "-----------------------" << NEWLINE;
|
||||||
fputs(ss.str().c_str(), file);
|
fputs(ss.str().c_str(), file);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
if (first_console_message_) {
|
|
||||||
test_runner::Alert(
|
|
||||||
browser, "Console messages written to \"" + console_log_file_ + "\"");
|
|
||||||
first_console_message_ = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -397,7 +397,7 @@ class ClientHandler : public CefClient,
|
||||||
bool offline_;
|
bool offline_;
|
||||||
|
|
||||||
// True if Favicon images should be downloaded.
|
// True if Favicon images should be downloaded.
|
||||||
bool download_favicon_images_;
|
bool download_favicon_images_ = false;
|
||||||
|
|
||||||
#if defined(OS_LINUX)
|
#if defined(OS_LINUX)
|
||||||
// Custom dialog handlers for GTK.
|
// Custom dialog handlers for GTK.
|
||||||
|
@ -435,17 +435,16 @@ class ClientHandler : public CefClient,
|
||||||
} test_menu_state_;
|
} test_menu_state_;
|
||||||
|
|
||||||
// The current number of browsers using this handler.
|
// The current number of browsers using this handler.
|
||||||
int browser_count_;
|
int browser_count_ = 0;
|
||||||
|
|
||||||
// Console logging state.
|
// Console logging state.
|
||||||
const std::string console_log_file_;
|
const std::string console_log_file_;
|
||||||
bool first_console_message_;
|
|
||||||
|
|
||||||
// True if an editable field currently has focus.
|
// True if an editable field currently has focus.
|
||||||
bool focus_on_editable_field_;
|
bool focus_on_editable_field_ = false;
|
||||||
|
|
||||||
// True for the initial navigation after browser creation.
|
// True for the initial navigation after browser creation.
|
||||||
bool initial_navigation_;
|
bool initial_navigation_ = true;
|
||||||
|
|
||||||
// Set of Handlers registered with the message router.
|
// Set of Handlers registered with the message router.
|
||||||
MessageHandlerSet message_handler_set_;
|
MessageHandlerSet message_handler_set_;
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace client {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// The default URL to load in a browser window.
|
// The default URL to load in a browser window.
|
||||||
const char kDefaultUrl[] = "http://www.google.com";
|
const char kDefaultUrl[] = "https://www.google.com";
|
||||||
|
|
||||||
// Returns the ARGB value for |color|.
|
// Returns the ARGB value for |color|.
|
||||||
cef_color_t ParseColor(const std::string& color) {
|
cef_color_t ParseColor(const std::string& color) {
|
||||||
|
|
|
@ -142,7 +142,7 @@ void RunNewWindowTest(CefRefPtr<CefBrowser> browser) {
|
||||||
|
|
||||||
void RunPopupWindowTest(CefRefPtr<CefBrowser> browser) {
|
void RunPopupWindowTest(CefRefPtr<CefBrowser> browser) {
|
||||||
browser->GetMainFrame()->ExecuteJavaScript(
|
browser->GetMainFrame()->ExecuteJavaScript(
|
||||||
"window.open('http://www.google.com');", "about:blank", 0);
|
"window.open('https://www.google.com');", "about:blank", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModifyZoom(CefRefPtr<CefBrowser> browser, double delta) {
|
void ModifyZoom(CefRefPtr<CefBrowser> browser, double delta) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ function execURLRequest() {
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white" onload="setup()">
|
<body bgcolor="white" onload="setup()">
|
||||||
<form id="form">
|
<form id="form">
|
||||||
URL: <input type="text" id="url" value="http://www.google.com">
|
URL: <input type="text" id="url" value="https://www.google.com">
|
||||||
<br/><input type="button" onclick="execURLRequest();" value="Execute CefURLRequest">
|
<br/><input type="button" onclick="execURLRequest();" value="Execute CefURLRequest">
|
||||||
<br/><textarea rows="10" cols="40" id="ta"></textarea>
|
<br/><textarea rows="10" cols="40" id="ta"></textarea>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue