Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1890513004: Remove dependency on the DevTools agent for console logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reuse current console log call but removed devtools agent dependency. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 void WebLocalFrameImpl::setIsolatedWorldHumanReadableName(int worldID, const Web String& humanReadableName) 739 void WebLocalFrameImpl::setIsolatedWorldHumanReadableName(int worldID, const Web String& humanReadableName)
740 { 740 {
741 DCHECK(frame()); 741 DCHECK(frame());
742 DOMWrapperWorld::setIsolatedWorldHumanReadableName(worldID, humanReadableNam e); 742 DOMWrapperWorld::setIsolatedWorldHumanReadableName(worldID, humanReadableNam e);
743 } 743 }
744 744
745 void WebLocalFrameImpl::addMessageToConsole(const WebConsoleMessage& message) 745 void WebLocalFrameImpl::addMessageToConsole(const WebConsoleMessage& message)
746 { 746 {
747 DCHECK(frame()); 747 DCHECK(frame());
748 748
749 MessageLevel webCoreMessageLevel; 749 MessageLevel webCoreMessageLevel = LogMessageLevel;
750 switch (message.level) { 750 switch (message.level) {
751 case WebConsoleMessage::LevelDebug: 751 case WebConsoleMessage::LevelDebug:
752 webCoreMessageLevel = DebugMessageLevel; 752 webCoreMessageLevel = DebugMessageLevel;
753 break; 753 break;
754 case WebConsoleMessage::LevelLog: 754 case WebConsoleMessage::LevelLog:
755 webCoreMessageLevel = LogMessageLevel; 755 webCoreMessageLevel = LogMessageLevel;
756 break; 756 break;
757 case WebConsoleMessage::LevelWarning: 757 case WebConsoleMessage::LevelWarning:
758 webCoreMessageLevel = WarningMessageLevel; 758 webCoreMessageLevel = WarningMessageLevel;
759 break; 759 break;
760 case WebConsoleMessage::LevelError: 760 case WebConsoleMessage::LevelError:
761 webCoreMessageLevel = ErrorMessageLevel; 761 webCoreMessageLevel = ErrorMessageLevel;
762 break; 762 break;
763 default: 763 // Unsupported values.
764 NOTREACHED(); 764 case WebConsoleMessage::LevelInfo:
765 return; 765 case WebConsoleMessage::LevelRevokedError:
766 break;
766 } 767 }
767 768
768 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag e.columnNumber)); 769 frame()->document()->addConsoleMessage(ConsoleMessage::create(OtherMessageSo urce, webCoreMessageLevel, message.text, message.url, message.lineNumber, messag e.columnNumber));
769 } 770 }
770 771
771 void WebLocalFrameImpl::collectGarbage() 772 void WebLocalFrameImpl::collectGarbage()
772 { 773 {
773 if (!frame()) 774 if (!frame())
774 return; 775 return;
775 if (!frame()->settings()->scriptEnabled()) 776 if (!frame()->settings()->scriptEnabled())
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 return WebSandboxFlags::None; 2122 return WebSandboxFlags::None;
2122 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2123 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2123 } 2124 }
2124 2125
2125 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2126 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2126 { 2127 {
2127 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2128 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2128 } 2129 }
2129 2130
2130 } // namespace blink 2131 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698