| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "web/tests/sim/SimWebViewClient.h" | 5 #include "web/tests/sim/SimWebViewClient.h" |
| 6 | 6 |
| 7 #include "public/platform/WebLayerTreeView.h" | 7 #include "public/platform/WebLayerTreeView.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 SimWebViewClient::SimWebViewClient(WebLayerTreeView& layerTreeView) | 11 SimWebViewClient::SimWebViewClient(WebLayerTreeView& layerTreeView) |
| 12 : m_hadVisuallyNonEmptyLayout(false) | 12 : m_visuallyNonEmptyLayoutCount(0) |
| 13 , m_hadFinishedParsingLayout(false) | 13 , m_finishedParsingLayoutCount(0) |
| 14 , m_hadFinishedLoadingLayout(false) | 14 , m_finishedLoadingLayoutCount(0) |
| 15 , m_layerTreeView(&layerTreeView) | 15 , m_layerTreeView(&layerTreeView) |
| 16 { | 16 { |
| 17 } | 17 } |
| 18 | 18 |
| 19 void SimWebViewClient::didMeaningfulLayout(WebMeaningfulLayout meaningfulLayout) | 19 void SimWebViewClient::didMeaningfulLayout(WebMeaningfulLayout meaningfulLayout) |
| 20 { | 20 { |
| 21 switch (meaningfulLayout) { | 21 switch (meaningfulLayout) { |
| 22 case WebMeaningfulLayout::VisuallyNonEmpty: | 22 case WebMeaningfulLayout::VisuallyNonEmpty: |
| 23 m_hadVisuallyNonEmptyLayout = true; | 23 m_visuallyNonEmptyLayoutCount++; |
| 24 break; | 24 break; |
| 25 case WebMeaningfulLayout::FinishedParsing: | 25 case WebMeaningfulLayout::FinishedParsing: |
| 26 m_hadFinishedParsingLayout = true; | 26 m_finishedParsingLayoutCount++; |
| 27 break; | 27 break; |
| 28 case WebMeaningfulLayout::FinishedLoading: | 28 case WebMeaningfulLayout::FinishedLoading: |
| 29 m_hadFinishedLoadingLayout = true; | 29 m_finishedLoadingLayoutCount++; |
| 30 break; | 30 break; |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace blink | 34 } // namespace blink |
| OLD | NEW |