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 "chrome/renderer/pepper/ppb_pdf_impl.h" | 5 #include "chrome/renderer/pepper/ppb_pdf_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/safe_numerics.h" | 9 #include "base/safe_numerics.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return false; | 236 return false; |
237 #endif | 237 #endif |
238 } | 238 } |
239 | 239 |
240 void SearchString(PP_Instance instance, | 240 void SearchString(PP_Instance instance, |
241 const unsigned short* input_string, | 241 const unsigned short* input_string, |
242 const unsigned short* input_term, | 242 const unsigned short* input_term, |
243 bool case_sensitive, | 243 bool case_sensitive, |
244 PP_PrivateFindResult** results, | 244 PP_PrivateFindResult** results, |
245 int* count) { | 245 int* count) { |
246 const char16* string = reinterpret_cast<const char16*>(input_string); | 246 const base::char16* string = |
247 const char16* term = reinterpret_cast<const char16*>(input_term); | 247 reinterpret_cast<const base::char16*>(input_string); |
| 248 const base::char16* term = |
| 249 reinterpret_cast<const base::char16*>(input_term); |
248 | 250 |
249 UErrorCode status = U_ZERO_ERROR; | 251 UErrorCode status = U_ZERO_ERROR; |
250 UStringSearch* searcher = usearch_open( | 252 UStringSearch* searcher = usearch_open( |
251 term, -1, string, -1, RenderThread::Get()->GetLocale().c_str(), 0, | 253 term, -1, string, -1, RenderThread::Get()->GetLocale().c_str(), 0, |
252 &status); | 254 &status); |
253 DCHECK(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING || | 255 DCHECK(status == U_ZERO_ERROR || status == U_USING_FALLBACK_WARNING || |
254 status == U_USING_DEFAULT_WARNING); | 256 status == U_USING_DEFAULT_WARNING); |
255 UCollationStrength strength = case_sensitive ? UCOL_TERTIARY : UCOL_PRIMARY; | 257 UCollationStrength strength = case_sensitive ? UCOL_TERTIARY : UCOL_PRIMARY; |
256 | 258 |
257 UCollator* collator = usearch_getCollator(searcher); | 259 UCollator* collator = usearch_getCollator(searcher); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 454 |
453 // static | 455 // static |
454 void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { | 456 void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { |
455 #if defined(ENABLE_FULL_PRINTING) | 457 #if defined(ENABLE_FULL_PRINTING) |
456 blink::WebElement element = GetWebElement(instance_id); | 458 blink::WebElement element = GetWebElement(instance_id); |
457 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); | 459 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); |
458 if (helper) | 460 if (helper) |
459 helper->PrintNode(element); | 461 helper->PrintNode(element); |
460 #endif // ENABLE_FULL_PRINTING | 462 #endif // ENABLE_FULL_PRINTING |
461 } | 463 } |
OLD | NEW |