| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |