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

Side by Side Diff: chrome/renderer/chrome_ppb_pdf_impl.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | ppapi/proxy/mock_resource.cc » ('j') | ppapi/shared_impl/resource.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_ppb_pdf_impl.h" 5 #include "chrome/renderer/chrome_ppb_pdf_impl.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 30 matching lines...) Expand all
41 using webkit::ppapi::PluginInstance; 41 using webkit::ppapi::PluginInstance;
42 using WebKit::WebElement; 42 using WebKit::WebElement;
43 using WebKit::WebView; 43 using WebKit::WebView;
44 using content::RenderThread; 44 using content::RenderThread;
45 45
46 namespace chrome { 46 namespace chrome {
47 47
48 #if defined(OS_LINUX) || defined(OS_OPENBSD) 48 #if defined(OS_LINUX) || defined(OS_OPENBSD)
49 class PrivateFontFile : public ppapi::Resource { 49 class PrivateFontFile : public ppapi::Resource {
50 public: 50 public:
51 PrivateFontFile(PP_Instance instance, int fd) : Resource(instance), fd_(fd) { 51 PrivateFontFile(PP_Instance instance, int fd)
52 : Resource(ppapi::OBJECT_IS_IMPL, instance),
53 fd_(fd) {
52 } 54 }
53 virtual ~PrivateFontFile() { 55 virtual ~PrivateFontFile() {
54 } 56 }
55 57
56 bool GetFontTable(uint32_t table, 58 bool GetFontTable(uint32_t table,
57 void* output, 59 void* output,
58 uint32_t* output_length) { 60 uint32_t* output_length) {
59 size_t temp_size = static_cast<size_t>(*output_length); 61 size_t temp_size = static_cast<size_t>(*output_length);
60 bool rv = content::GetFontTable( 62 bool rv = content::GetFontTable(
61 fd_, table, static_cast<uint8_t*>(output), &temp_size); 63 fd_, table, static_cast<uint8_t*>(output), &temp_size);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 &SaveAs, 377 &SaveAs,
376 &Print 378 &Print
377 }; 379 };
378 380
379 // static 381 // static
380 const PPB_PDF* PPB_PDF_Impl::GetInterface() { 382 const PPB_PDF* PPB_PDF_Impl::GetInterface() {
381 return &ppb_pdf; 383 return &ppb_pdf;
382 } 384 }
383 385
384 } // namespace chrome 386 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/mock_resource.cc » ('j') | ppapi/shared_impl/resource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698