Chromium Code Reviews| Index: pdf/instance.cc |
| diff --git a/pdf/instance.cc b/pdf/instance.cc |
| index 9cb78294b090980824760b2b3a51dddeb026c48e..cda0c588a665b6a7d9579fa1770681d27461581d 100644 |
| --- a/pdf/instance.cc |
| +++ b/pdf/instance.cc |
| @@ -1499,6 +1499,12 @@ void Instance::DocumentLoadComplete(int page_count) { |
| DCHECK(document_load_state_ == LOAD_STATE_LOADING); |
| document_load_state_ = LOAD_STATE_COMPLETE; |
| UserMetricsRecordAction("PDF.LoadSuccess"); |
| + |
| + if (did_call_start_loading_) { |
|
ivandavid
2014/08/15 00:35:23
I know you said to create a different CL for all t
Vitaly Buka (NO REVIEWS)
2014/08/15 00:58:36
Seems reasonable.
On 2014/08/15 00:35:23, ivandav
Lei Zhang
2014/08/15 02:12:55
This looks correct. Before this change, there's 2
|
| + pp::PDF::DidStopLoading(this); |
| + did_call_start_loading_ = false; |
| + } |
| + |
| if (on_load_callback_.is_string()) |
| ExecuteScript(on_load_callback_); |
| // Note: If we are in print preview mode on_load_callback_ might call |
| @@ -1515,11 +1521,6 @@ void Instance::DocumentLoadComplete(int page_count) { |
| if (!pp::PDF::IsAvailable()) |
| return; |
| - if (did_call_start_loading_) { |
| - pp::PDF::DidStopLoading(this); |
| - did_call_start_loading_ = false; |
| - } |
| - |
| int content_restrictions = |
| CONTENT_RESTRICTION_CUT | CONTENT_RESTRICTION_PASTE; |
| if (!engine_->HasPermission(PDFEngine::PERMISSION_COPY)) |