Print console output of devtools.
This commit is contained in:
parent
3872db20d8
commit
47bc6a29a7
2 changed files with 16 additions and 0 deletions
|
@ -336,6 +336,17 @@ void InspectableWebContentsImpl::WebContentsDestroyed() {
|
||||||
frontend_host_.reset();
|
frontend_host_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool InspectableWebContentsImpl::AddMessageToConsole(
|
||||||
|
content::WebContents* source,
|
||||||
|
int32 level,
|
||||||
|
const base::string16& message,
|
||||||
|
int32 line_no,
|
||||||
|
const base::string16& source_id) {
|
||||||
|
logging::LogMessage("CONSOLE", line_no, level).stream() << "\"" <<
|
||||||
|
message << "\", source: " << source_id << " (" << line_no << ")";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void InspectableWebContentsImpl::HandleKeyboardEvent(
|
void InspectableWebContentsImpl::HandleKeyboardEvent(
|
||||||
content::WebContents* source,
|
content::WebContents* source,
|
||||||
const content::NativeWebKeyboardEvent& event) {
|
const content::NativeWebKeyboardEvent& event) {
|
||||||
|
|
|
@ -107,6 +107,11 @@ class InspectableWebContentsImpl :
|
||||||
|
|
||||||
// content::WebContentsDelegate
|
// content::WebContentsDelegate
|
||||||
|
|
||||||
|
virtual bool AddMessageToConsole(content::WebContents* source,
|
||||||
|
int32 level,
|
||||||
|
const base::string16& message,
|
||||||
|
int32 line_no,
|
||||||
|
const base::string16& source_id) OVERRIDE;
|
||||||
virtual void HandleKeyboardEvent(
|
virtual void HandleKeyboardEvent(
|
||||||
content::WebContents*, const content::NativeWebKeyboardEvent&) OVERRIDE;
|
content::WebContents*, const content::NativeWebKeyboardEvent&) OVERRIDE;
|
||||||
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
||||||
|
|
Loading…
Reference in a new issue