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

Side by Side Diff: pdf/instance.cc

Issue 554893002: [WORK_IN_PROGRESS] PDF::Save() fix for out-of-process-pdf. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix for constrained windows Created 6 years, 3 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
« no previous file with comments | « extensions/extensions.gyp ('k') | pdf/out_of_process_instance.cc » ('j') | 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 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 pp::CompletionCallback callback = 1380 pp::CompletionCallback callback =
1381 callback_factory_.NewCallback(&Instance::OnPrint); 1381 callback_factory_.NewCallback(&Instance::OnPrint);
1382 pp::Module::Get()->core()->CallOnMainThread(0, callback); 1382 pp::Module::Get()->core()->CallOnMainThread(0, callback);
1383 } 1383 }
1384 1384
1385 void Instance::OnPrint(int32_t) { 1385 void Instance::OnPrint(int32_t) {
1386 pp::PDF::Print(this); 1386 pp::PDF::Print(this);
1387 } 1387 }
1388 1388
1389 void Instance::SaveAs() { 1389 void Instance::SaveAs() {
1390 pp::PDF::SaveAs(this); 1390 pp::PDF::SaveAs(this, "");
1391 } 1391 }
1392 1392
1393 void Instance::SubmitForm(const std::string& url, 1393 void Instance::SubmitForm(const std::string& url,
1394 const void* data, 1394 const void* data,
1395 int length) { 1395 int length) {
1396 pp::URLRequestInfo request(this); 1396 pp::URLRequestInfo request(this);
1397 request.SetURL(url); 1397 request.SetURL(url);
1398 request.SetMethod("POST"); 1398 request.SetMethod("POST");
1399 request.AppendDataToBody(reinterpret_cast<const char*>(data), length); 1399 request.AppendDataToBody(reinterpret_cast<const char*>(data), length);
1400 1400
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 return instance_->HasScriptableMethod(name, exception); 2739 return instance_->HasScriptableMethod(name, exception);
2740 } 2740 }
2741 2741
2742 pp::Var PDFScriptableObject::Call(const pp::Var& method, 2742 pp::Var PDFScriptableObject::Call(const pp::Var& method,
2743 const std::vector<pp::Var>& args, 2743 const std::vector<pp::Var>& args,
2744 pp::Var* exception) { 2744 pp::Var* exception) {
2745 return instance_->CallScriptableMethod(method, args, exception); 2745 return instance_->CallScriptableMethod(method, args, exception);
2746 } 2746 }
2747 2747
2748 } // namespace chrome_pdf 2748 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « extensions/extensions.gyp ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698