Chromium Code Reviews| 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 960 m_frontend->javascriptDialogOpening(message); | 960 m_frontend->javascriptDialogOpening(message); |
| 961 } | 961 } |
| 962 | 962 |
| 963 void InspectorPageAgent::didRunJavaScriptDialog() | 963 void InspectorPageAgent::didRunJavaScriptDialog() |
| 964 { | 964 { |
| 965 m_frontend->javascriptDialogClosed(); | 965 m_frontend->javascriptDialogClosed(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 void InspectorPageAgent::applyScreenWidthOverride(long* width) | 968 void InspectorPageAgent::applyScreenWidthOverride(long* width) |
| 969 { | 969 { |
| 970 long widthOverride = m_state->getLong(PageAgentState::pageAgentScreenWidthOv erride); | 970 // FIXME: cleanup all references to page agent overrides. |
|
pfeldman
2013/09/19 12:46:05
Do it right away!
| |
| 971 if (widthOverride) | |
| 972 *width = widthOverride; | |
| 973 } | 971 } |
| 974 | 972 |
| 975 bool InspectorPageAgent::shouldApplyScreenWidthOverride() | 973 bool InspectorPageAgent::shouldApplyScreenWidthOverride() |
| 976 { | 974 { |
| 977 long width = 0; | 975 long width = 0; |
| 978 applyScreenWidthOverride(&width); | 976 applyScreenWidthOverride(&width); |
| 979 return !!width; | 977 return !!width; |
| 980 } | 978 } |
| 981 | 979 |
| 982 void InspectorPageAgent::applyScreenHeightOverride(long* height) | 980 void InspectorPageAgent::applyScreenHeightOverride(long* height) |
| 983 { | 981 { |
| 984 long heightOverride = m_state->getLong(PageAgentState::pageAgentScreenHeight Override); | 982 // FIXME: cleanup all references to page agent overrides. |
|
pfeldman
2013/09/19 12:46:05
ditto
| |
| 985 if (heightOverride) | |
| 986 *height = heightOverride; | |
| 987 } | 983 } |
| 988 | 984 |
| 989 bool InspectorPageAgent::shouldApplyScreenHeightOverride() | 985 bool InspectorPageAgent::shouldApplyScreenHeightOverride() |
| 990 { | 986 { |
| 991 long height = 0; | 987 long height = 0; |
| 992 applyScreenHeightOverride(&height); | 988 applyScreenHeightOverride(&height); |
| 993 return !!height; | 989 return !!height; |
| 994 } | 990 } |
| 995 | 991 |
| 996 void InspectorPageAgent::didPaint(RenderObject*, GraphicsContext* context, const LayoutRect& rect) | 992 void InspectorPageAgent::didPaint(RenderObject*, GraphicsContext* context, const LayoutRect& rect) |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1285 } | 1281 } |
| 1286 | 1282 |
| 1287 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) | 1283 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) |
| 1288 { | 1284 { |
| 1289 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1285 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
| 1290 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; | 1286 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; |
| 1291 } | 1287 } |
| 1292 | 1288 |
| 1293 } // namespace WebCore | 1289 } // namespace WebCore |
| 1294 | 1290 |
| OLD | NEW |