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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 bool continuousPaintingEnabled = m_state->getBoolean(PageAgentState::pag
eAgentContinuousPaintingEnabled); | 391 bool continuousPaintingEnabled = m_state->getBoolean(PageAgentState::pag
eAgentContinuousPaintingEnabled); |
392 setContinuousPaintingEnabled(0, continuousPaintingEnabled); | 392 setContinuousPaintingEnabled(0, continuousPaintingEnabled); |
393 bool showScrollBottleneckRects = m_state->getBoolean(PageAgentState::pag
eAgentShowScrollBottleneckRects); | 393 bool showScrollBottleneckRects = m_state->getBoolean(PageAgentState::pag
eAgentShowScrollBottleneckRects); |
394 setShowScrollBottleneckRects(0, showScrollBottleneckRects); | 394 setShowScrollBottleneckRects(0, showScrollBottleneckRects); |
395 | 395 |
396 updateViewMetricsFromState(); | 396 updateViewMetricsFromState(); |
397 updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touc
hEventEmulationEnabled)); | 397 updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touc
hEventEmulationEnabled)); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 void InspectorPageAgent::webViewResized(const IntSize& size) | |
402 { | |
403 int currentWidth = static_cast<int>(m_state->getLong(PageAgentState::pageAge
ntScreenWidthOverride)); | |
404 m_overlay->resize(currentWidth ? size : IntSize()); | |
405 } | |
406 | |
407 void InspectorPageAgent::enable(ErrorString*) | 401 void InspectorPageAgent::enable(ErrorString*) |
408 { | 402 { |
409 m_enabled = true; | 403 m_enabled = true; |
410 m_state->setBoolean(PageAgentState::pageAgentEnabled, true); | 404 m_state->setBoolean(PageAgentState::pageAgentEnabled, true); |
411 m_instrumentingAgents->setInspectorPageAgent(this); | 405 m_instrumentingAgents->setInspectorPageAgent(this); |
412 } | 406 } |
413 | 407 |
414 void InspectorPageAgent::disable(ErrorString*) | 408 void InspectorPageAgent::disable(ErrorString*) |
415 { | 409 { |
416 m_enabled = false; | 410 m_enabled = false; |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 } | 1256 } |
1263 | 1257 |
1264 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1258 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
1265 { | 1259 { |
1266 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1260 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1267 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1261 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
1268 } | 1262 } |
1269 | 1263 |
1270 } // namespace WebCore | 1264 } // namespace WebCore |
1271 | 1265 |
OLD | NEW |