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

Side by Side Diff: ppapi/proxy/ppb_font_proxy.cc

Issue 6341015: Fix some bugs with incorrect ! (both missing and extra) in the proxy error ha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « ppapi/proxy/ppb_audio_proxy.cc ('k') | no next file » | 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) 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 "ppapi/proxy/ppb_font_proxy.h" 5 #include "ppapi/proxy/ppb_font_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_font_dev.h" 7 #include "ppapi/c/dev/ppb_font_dev.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/plugin_resource.h" 9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 in_description.SetToPPFontDescription(dispatcher(), &in_pp_desc, false); 242 in_description.SetToPPFontDescription(dispatcher(), &in_pp_desc, false);
243 243
244 // Make sure the output is always defined so we can still serialize it back 244 // Make sure the output is always defined so we can still serialize it back
245 // to the plugin below. 245 // to the plugin below.
246 PP_FontDescription_Dev out_pp_desc; 246 PP_FontDescription_Dev out_pp_desc;
247 memset(&out_pp_desc, 0, sizeof(PP_FontDescription_Dev)); 247 memset(&out_pp_desc, 0, sizeof(PP_FontDescription_Dev));
248 out_pp_desc.face = PP_MakeUndefined(); 248 out_pp_desc.face = PP_MakeUndefined();
249 249
250 result->SetHostResource(instance, 250 result->SetHostResource(instance,
251 ppb_font_target()->Create(instance, &in_pp_desc)); 251 ppb_font_target()->Create(instance, &in_pp_desc));
252 if (result->is_null()) { 252 if (!result->is_null()) {
253 // Get the metrics and resulting description to return to the browser. 253 // Get the metrics and resulting description to return to the browser.
254 PP_FontMetrics_Dev metrics; 254 PP_FontMetrics_Dev metrics;
255 if (ppb_font_target()->Describe(result->host_resource(), &out_pp_desc, 255 if (ppb_font_target()->Describe(result->host_resource(), &out_pp_desc,
256 &metrics)) { 256 &metrics)) {
257 out_metrics->assign(reinterpret_cast<const char*>(&metrics), 257 out_metrics->assign(reinterpret_cast<const char*>(&metrics),
258 sizeof(PP_FontMetrics_Dev)); 258 sizeof(PP_FontMetrics_Dev));
259 } 259 }
260 } 260 }
261 261
262 // This must always get called or it will assert when trying to serialize 262 // This must always get called or it will assert when trying to serialize
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 run.text = text.Get(dispatcher()); 317 run.text = text.Get(dispatcher());
318 run.rtl = text_is_rtl; 318 run.rtl = text_is_rtl;
319 run.override_direction = override_direction; 319 run.override_direction = override_direction;
320 320
321 *result = ppb_font_target()->PixelOffsetForCharacter(font.host_resource(), 321 *result = ppb_font_target()->PixelOffsetForCharacter(font.host_resource(),
322 &run, char_offset); 322 &run, char_offset);
323 } 323 }
324 324
325 } // namespace proxy 325 } // namespace proxy
326 } // namespace pp 326 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698