Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: pdf/instance.cc

Issue 397713005: Ensure pdf plugin sends DidStartLoading() consistently (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "pdf/instance.h" 5 #include "pdf/instance.h"
6 6
7 #include <algorithm> // for min() 7 #include <algorithm> // for min()
8 #define _USE_MATH_DEFINES // for M_PI 8 #define _USE_MATH_DEFINES // for M_PI
9 #include <cmath> // for log() and pow() 9 #include <cmath> // for log() and pow()
10 #include <math.h> 10 #include <math.h>
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 if (!url) 343 if (!url)
344 return false; 344 return false;
345 345
346 CreatePageIndicator(IsPrintPreviewUrl(url)); 346 CreatePageIndicator(IsPrintPreviewUrl(url));
347 347
348 if (!full_) { 348 if (!full_) {
349 // For PDFs embedded in a frame, we don't get the data automatically like we 349 // For PDFs embedded in a frame, we don't get the data automatically like we
350 // do for full-frame loads. Start loading the data manually. 350 // do for full-frame loads. Start loading the data manually.
351 LoadUrl(url); 351 LoadUrl(url);
352 } else {
353 DCHECK(!did_call_start_loading_);
Vitaly Buka (NO REVIEWS) 2014/07/16 18:32:45 Maybe CHECK() to make crash in release, so we coul
354 pp::PDF::DidStartLoading(this);
355 did_call_start_loading_ = true;
jam 2014/07/16 21:25:43 I'm a bit confused, I tried doing window.print() (
352 } 356 }
353 357
354 ZoomLimitsChanged(kMinZoom, kMaxZoom); 358 ZoomLimitsChanged(kMinZoom, kMaxZoom);
355 359
356 text_input_.reset(new pp::TextInput_Dev(this)); 360 text_input_.reset(new pp::TextInput_Dev(this));
357 361
358 url_ = url; 362 url_ = url;
359 return engine_->New(url); 363 return engine_->New(url);
360 } 364 }
361 365
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 return instance_->HasScriptableMethod(name, exception); 2708 return instance_->HasScriptableMethod(name, exception);
2705 } 2709 }
2706 2710
2707 pp::Var PDFScriptableObject::Call(const pp::Var& method, 2711 pp::Var PDFScriptableObject::Call(const pp::Var& method,
2708 const std::vector<pp::Var>& args, 2712 const std::vector<pp::Var>& args,
2709 pp::Var* exception) { 2713 pp::Var* exception) {
2710 return instance_->CallScriptableMethod(method, args, exception); 2714 return instance_->CallScriptableMethod(method, args, exception);
2711 } 2715 }
2712 2716
2713 } // namespace chrome_pdf 2717 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698