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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 updateTouchEventEmulationInPage(false); | 348 updateTouchEventEmulationInPage(false); |
349 #endif | 349 #endif |
350 m_frontend = 0; | 350 m_frontend = 0; |
351 } | 351 } |
352 | 352 |
353 void InspectorPageAgent::restore() | 353 void InspectorPageAgent::restore() |
354 { | 354 { |
355 if (m_state->getBoolean(PageAgentState::pageAgentEnabled)) { | 355 if (m_state->getBoolean(PageAgentState::pageAgentEnabled)) { |
356 ErrorString error; | 356 ErrorString error; |
357 enable(&error); | 357 enable(&error); |
| 358 bool scriptExecutionDisabled = m_state->getBoolean(PageAgentState::pageA
gentScriptExecutionDisabled); |
| 359 setScriptExecutionDisabled(0, scriptExecutionDisabled); |
| 360 |
| 361 int currentWidth = static_cast<int>(m_state->getLong(PageAgentState::pag
eAgentScreenWidthOverride)); |
| 362 int currentHeight = static_cast<int>(m_state->getLong(PageAgentState::pa
geAgentScreenHeightOverride)); |
| 363 double currentFontScaleFactor = m_state->getDouble(PageAgentState::pageA
gentFontScaleFactorOverride); |
| 364 bool currentFitWindow = m_state->getBoolean(PageAgentState::pageAgentFit
Window); |
| 365 updateViewMetrics(currentWidth, currentHeight, currentFontScaleFactor, c
urrentFitWindow); |
358 #if ENABLE(TOUCH_EVENTS) | 366 #if ENABLE(TOUCH_EVENTS) |
359 updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touc
hEventEmulationEnabled)); | 367 updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touc
hEventEmulationEnabled)); |
360 #endif | 368 #endif |
361 } | 369 } |
362 } | 370 } |
363 | 371 |
364 void InspectorPageAgent::enable(ErrorString*) | 372 void InspectorPageAgent::enable(ErrorString*) |
365 { | 373 { |
366 m_state->setBoolean(PageAgentState::pageAgentEnabled, true); | 374 m_state->setBoolean(PageAgentState::pageAgentEnabled, true); |
367 bool scriptExecutionDisabled = m_state->getBoolean(PageAgentState::pageAgent
ScriptExecutionDisabled); | |
368 setScriptExecutionDisabled(0, scriptExecutionDisabled); | |
369 m_instrumentingAgents->setInspectorPageAgent(this); | 375 m_instrumentingAgents->setInspectorPageAgent(this); |
370 } | 376 } |
371 | 377 |
372 void InspectorPageAgent::disable(ErrorString*) | 378 void InspectorPageAgent::disable(ErrorString*) |
373 { | 379 { |
374 m_state->setBoolean(PageAgentState::pageAgentEnabled, false); | 380 m_state->setBoolean(PageAgentState::pageAgentEnabled, false); |
375 m_instrumentingAgents->setInspectorPageAgent(0); | 381 m_instrumentingAgents->setInspectorPageAgent(0); |
376 | 382 |
377 setScriptExecutionDisabled(0, false); | 383 setScriptExecutionDisabled(0, false); |
378 | 384 |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 if (!settings) | 1120 if (!settings) |
1115 return; | 1121 return; |
1116 | 1122 |
1117 settings->setShowDebugBorders(visible); | 1123 settings->setShowDebugBorders(visible); |
1118 settings->setShowRepaintCounter(visible); | 1124 settings->setShowRepaintCounter(visible); |
1119 } | 1125 } |
1120 | 1126 |
1121 } // namespace WebCore | 1127 } // namespace WebCore |
1122 | 1128 |
1123 #endif // ENABLE(INSPECTOR) | 1129 #endif // ENABLE(INSPECTOR) |
OLD | NEW |