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

Side by Side Diff: ppapi/shared_impl/private/ppb_font_shared.h

Issue 9317100: Use the correct Resource constructor for PPB_Font_Shared in the plugin process. (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/shared_impl/private/ppb_font_shared.cc » ('j') | 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 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 uint32_t color, 52 uint32_t color,
53 const PP_Rect* clip, 53 const PP_Rect* clip,
54 PP_Bool image_data_is_opaque) OVERRIDE; 54 PP_Bool image_data_is_opaque) OVERRIDE;
55 virtual int32_t MeasureText(const PP_TextRun_Dev* text) OVERRIDE; 55 virtual int32_t MeasureText(const PP_TextRun_Dev* text) OVERRIDE;
56 virtual uint32_t CharacterOffsetForPixel(const PP_TextRun_Dev* text, 56 virtual uint32_t CharacterOffsetForPixel(const PP_TextRun_Dev* text,
57 int32_t pixel_position) OVERRIDE; 57 int32_t pixel_position) OVERRIDE;
58 virtual int32_t PixelOffsetForCharacter(const PP_TextRun_Dev* text, 58 virtual int32_t PixelOffsetForCharacter(const PP_TextRun_Dev* text,
59 uint32_t char_offset) OVERRIDE; 59 uint32_t char_offset) OVERRIDE;
60 60
61 private: 61 private:
62 PPB_Font_Shared(PP_Instance instance, const PP_FontDescription_Dev& desc, 62 struct InitAsImpl {};
63 struct InitAsProxy {};
64
65 // The dummy arguments control which version of Resource's constructor is
66 // called for this base class.
67 PPB_Font_Shared(const InitAsImpl&,
68 PP_Instance instance,
69 const PP_FontDescription_Dev& desc,
70 const ::ppapi::Preferences& prefs);
71 PPB_Font_Shared(const InitAsProxy&,
72 PP_Instance instance,
73 const PP_FontDescription_Dev& desc,
74 const ::ppapi::Preferences& prefs);
75
76 void Initialize(const PP_FontDescription_Dev& desc,
63 const ::ppapi::Preferences& prefs); 77 const ::ppapi::Preferences& prefs);
64 78
65 scoped_ptr< ::ppapi::WebKitForwarding::Font> font_impl_; 79 scoped_ptr< ::ppapi::WebKitForwarding::Font> font_impl_;
66 80
67 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Shared); 81 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Shared);
68 }; 82 };
69 83
70 } // namespace ppapi 84 } // namespace ppapi
71 85
72 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_ 86 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_FONT_SHARED_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/shared_impl/private/ppb_font_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698