OLD | NEW |
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 "components/pdf/renderer/ppb_pdf_impl.h" | 5 #include "components/pdf/renderer/ppb_pdf_impl.h" |
6 | 6 |
7 #include "base/files/scoped_file.h" | 7 #include "base/files/scoped_file.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 } | 323 } |
324 | 324 |
325 void SetLinkUnderCursor(PP_Instance instance_id, const char* url) { | 325 void SetLinkUnderCursor(PP_Instance instance_id, const char* url) { |
326 content::PepperPluginInstance* instance = | 326 content::PepperPluginInstance* instance = |
327 content::PepperPluginInstance::Get(instance_id); | 327 content::PepperPluginInstance::Get(instance_id); |
328 if (!instance) | 328 if (!instance) |
329 return; | 329 return; |
330 instance->SetLinkUnderCursor(url); | 330 instance->SetLinkUnderCursor(url); |
331 } | 331 } |
332 | 332 |
333 void GetV8ExternalSnapshotData(const char** natives_data_out, | 333 void GetV8ExternalSnapshotData(PP_Instance instance_id, |
| 334 const char** natives_data_out, |
334 int* natives_size_out, | 335 int* natives_size_out, |
335 const char** snapshot_data_out, | 336 const char** snapshot_data_out, |
336 int* snapshot_size_out) { | 337 int* snapshot_size_out) { |
337 gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out, | 338 gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out, |
338 natives_size_out, snapshot_data_out, snapshot_size_out); | 339 natives_size_out, snapshot_data_out, snapshot_size_out); |
339 } | 340 } |
340 | 341 |
341 const PPB_PDF ppb_pdf = { // | 342 const PPB_PDF ppb_pdf = { // |
342 &GetLocalizedString, // | 343 &GetLocalizedString, // |
343 &GetResourceImage, // | 344 &GetResourceImage, // |
(...skipping 28 matching lines...) Expand all Loading... |
372 bool PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { | 373 bool PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { |
373 return g_print_client ? g_print_client->Print(instance_id) : false; | 374 return g_print_client ? g_print_client->Print(instance_id) : false; |
374 } | 375 } |
375 | 376 |
376 void PPB_PDF_Impl::SetPrintClient(PPB_PDF_Impl::PrintClient* client) { | 377 void PPB_PDF_Impl::SetPrintClient(PPB_PDF_Impl::PrintClient* client) { |
377 CHECK(!g_print_client) << "There should only be a single PrintClient."; | 378 CHECK(!g_print_client) << "There should only be a single PrintClient."; |
378 g_print_client = client; | 379 g_print_client = client; |
379 } | 380 } |
380 | 381 |
381 } // namespace pdf | 382 } // namespace pdf |
OLD | NEW |