| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 } | 773 } |
| 774 | 774 |
| 775 void InspectorPageAgent::getScriptExecutionStatus(ErrorString*, PageCommandHandl
er::Result::Enum* status) | 775 void InspectorPageAgent::getScriptExecutionStatus(ErrorString*, PageCommandHandl
er::Result::Enum* status) |
| 776 { | 776 { |
| 777 bool disabledByScriptController = false; | 777 bool disabledByScriptController = false; |
| 778 bool disabledInSettings = false; | 778 bool disabledInSettings = false; |
| 779 Frame* frame = mainFrame(); | 779 Frame* frame = mainFrame(); |
| 780 if (frame) { | 780 if (frame) { |
| 781 disabledByScriptController = !frame->script().canExecuteScripts(NotAbout
ToExecuteScript); | 781 disabledByScriptController = !frame->script().canExecuteScripts(NotAbout
ToExecuteScript); |
| 782 if (frame->settings()) | 782 if (frame->settings()) |
| 783 disabledInSettings = !frame->settings()->isScriptEnabled(); | 783 disabledInSettings = !frame->settings()->scriptEnabled(); |
| 784 } | 784 } |
| 785 | 785 |
| 786 if (!disabledByScriptController) { | 786 if (!disabledByScriptController) { |
| 787 *status = PageCommandHandler::Result::Allowed; | 787 *status = PageCommandHandler::Result::Allowed; |
| 788 return; | 788 return; |
| 789 } | 789 } |
| 790 | 790 |
| 791 if (disabledInSettings) | 791 if (disabledInSettings) |
| 792 *status = PageCommandHandler::Result::Disabled; | 792 *status = PageCommandHandler::Result::Disabled; |
| 793 else | 793 else |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1270 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
| 1271 { | 1271 { |
| 1272 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1272 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
| 1273 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1273 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 } // namespace WebCore | 1276 } // namespace WebCore |
| 1277 | 1277 |
| OLD | NEW |