fix: respect LogJsConsoleMessages feature in InspectableWebContents::DidAddMessageToConsole (#30312)

This commit is contained in:
Jeremy Rose 2021-07-30 10:18:49 -07:00 committed by GitHub
parent 7b5deb2f3a
commit 9a63d96e83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View file

@ -971,20 +971,6 @@ void InspectableWebContents::WebContentsDestroyed() {
view_->GetDelegate()->DevToolsClosed();
}
bool InspectableWebContents::DidAddMessageToConsole(
content::WebContents* source,
blink::mojom::ConsoleMessageLevel level,
const std::u16string& message,
int32_t line_no,
const std::u16string& source_id) {
logging::LogMessage("CONSOLE", line_no,
blink::ConsoleMessageLevelToLogSeverity(level))
.stream()
<< "\"" << message << "\", source: " << source_id << " (" << line_no
<< ")";
return true;
}
bool InspectableWebContents::HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {

View file

@ -175,11 +175,6 @@ class InspectableWebContents
content::NavigationHandle* navigation_handle) override;
// content::WebContentsDelegate:
bool DidAddMessageToConsole(content::WebContents* source,
blink::mojom::ConsoleMessageLevel level,
const std::u16string& message,
int32_t line_no,
const std::u16string& source_id) override;
bool HandleKeyboardEvent(content::WebContents*,
const content::NativeWebKeyboardEvent&) override;
void CloseContents(content::WebContents* source) override;