| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 | 479 |
| 480 Response InspectorLayerTreeAgent::snapshotCommandLog( | 480 Response InspectorLayerTreeAgent::snapshotCommandLog( |
| 481 const String& snapshotId, | 481 const String& snapshotId, |
| 482 std::unique_ptr<Array<protocol::DictionaryValue>>* commandLog) { | 482 std::unique_ptr<Array<protocol::DictionaryValue>>* commandLog) { |
| 483 const PictureSnapshot* snapshot = nullptr; | 483 const PictureSnapshot* snapshot = nullptr; |
| 484 Response response = snapshotById(snapshotId, snapshot); | 484 Response response = snapshotById(snapshotId, snapshot); |
| 485 if (!response.isSuccess()) | 485 if (!response.isSuccess()) |
| 486 return response; | 486 return response; |
| 487 protocol::ErrorSupport errors; | 487 protocol::ErrorSupport errors; |
| 488 std::unique_ptr<protocol::Value> logValue = | 488 std::unique_ptr<protocol::Value> logValue = protocol::StringUtil::parseJSON( |
| 489 protocol::parseJSON(snapshot->snapshotCommandLog()->toJSONString()); | 489 snapshot->snapshotCommandLog()->toJSONString()); |
| 490 *commandLog = | 490 *commandLog = |
| 491 Array<protocol::DictionaryValue>::parse(logValue.get(), &errors); | 491 Array<protocol::DictionaryValue>::parse(logValue.get(), &errors); |
| 492 if (errors.hasErrors()) | 492 if (errors.hasErrors()) |
| 493 return Response::Error(errors.errors()); | 493 return Response::Error(errors.errors()); |
| 494 return Response::OK(); | 494 return Response::OK(); |
| 495 } | 495 } |
| 496 | 496 |
| 497 void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer) { | 497 void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer) { |
| 498 m_pageOverlayLayerIds.append(layer->platformLayer()->id()); | 498 m_pageOverlayLayerIds.append(layer->platformLayer()->id()); |
| 499 } | 499 } |
| 500 | 500 |
| 501 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) { | 501 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) { |
| 502 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 502 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
| 503 if (index == WTF::kNotFound) | 503 if (index == WTF::kNotFound) |
| 504 return; | 504 return; |
| 505 m_pageOverlayLayerIds.remove(index); | 505 m_pageOverlayLayerIds.remove(index); |
| 506 } | 506 } |
| 507 | 507 |
| 508 } // namespace blink | 508 } // namespace blink |
| OLD | NEW |