OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ppapi/proxy/pdf_resource.h" | 5 #include "ppapi/proxy/pdf_resource.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 Post(RENDERER, PpapiHostMsg_PDF_SetContentRestriction(restrictions)); | 117 Post(RENDERER, PpapiHostMsg_PDF_SetContentRestriction(restrictions)); |
118 } | 118 } |
119 | 119 |
120 void PDFResource::HistogramPDFPageCount(int count) { | 120 void PDFResource::HistogramPDFPageCount(int count) { |
121 UMA_HISTOGRAM_COUNTS_10000("PDF.PageCount", count); | 121 UMA_HISTOGRAM_COUNTS_10000("PDF.PageCount", count); |
122 } | 122 } |
123 | 123 |
124 void PDFResource::UserMetricsRecordAction(const PP_Var& action) { | 124 void PDFResource::UserMetricsRecordAction(const PP_Var& action) { |
125 scoped_refptr<ppapi::StringVar> action_str( | 125 scoped_refptr<ppapi::StringVar> action_str( |
126 ppapi::StringVar::FromPPVar(action)); | 126 ppapi::StringVar::FromPPVar(action)); |
127 if (action_str) { | 127 if (action_str.get()) { |
128 Post(RENDERER, | 128 Post(RENDERER, |
129 PpapiHostMsg_PDF_UserMetricsRecordAction(action_str->value())); | 129 PpapiHostMsg_PDF_UserMetricsRecordAction(action_str->value())); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 void PDFResource::HasUnsupportedFeature() { | 133 void PDFResource::HasUnsupportedFeature() { |
134 Post(RENDERER, PpapiHostMsg_PDF_HasUnsupportedFeature()); | 134 Post(RENDERER, PpapiHostMsg_PDF_HasUnsupportedFeature()); |
135 } | 135 } |
136 | 136 |
137 void PDFResource::Print() { | 137 void PDFResource::Print() { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 #error Not implemented. | 193 #error Not implemented. |
194 #endif | 194 #endif |
195 } | 195 } |
196 | 196 |
197 PP_Resource PDFResource::GetResourceImage(PP_ResourceImage image_id) { | 197 PP_Resource PDFResource::GetResourceImage(PP_ResourceImage image_id) { |
198 return GetResourceImageForScale(image_id, 1.0f); | 198 return GetResourceImageForScale(image_id, 1.0f); |
199 } | 199 } |
200 | 200 |
201 } // namespace proxy | 201 } // namespace proxy |
202 } // namespace ppapi | 202 } // namespace ppapi |
OLD | NEW |