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

Side by Side Diff: webkit/glue/plugins/pepper_font.h

Issue 5648004: Add the "virtual" keyword on method overrides that are missing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing file Created 10 years 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 | « webkit/glue/plugins/pepper_file_system.cc ('k') | webkit/glue/plugins/pepper_font.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_ 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_ 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "ppapi/c/dev/ppb_font_dev.h" 9 #include "ppapi/c/dev/ppb_font_dev.h"
10 #include "webkit/glue/plugins/pepper_resource.h" 10 #include "webkit/glue/plugins/pepper_resource.h"
11 11
12 namespace WebKit { 12 namespace WebKit {
13 class WebFont; 13 class WebFont;
14 } 14 }
15 15
16 namespace pepper { 16 namespace pepper {
17 17
18 class PluginInstance; 18 class PluginInstance;
19 19
20 class Font : public Resource { 20 class Font : public Resource {
21 public: 21 public:
22 Font(PluginModule* module, const PP_FontDescription_Dev& desc); 22 Font(PluginModule* module, const PP_FontDescription_Dev& desc);
23 virtual ~Font(); 23 virtual ~Font();
24 24
25 // Returns a pointer to the interface implementing PPB_Font that is exposed to 25 // Returns a pointer to the interface implementing PPB_Font that is exposed to
26 // the plugin. 26 // the plugin.
27 static const PPB_Font_Dev* GetInterface(); 27 static const PPB_Font_Dev* GetInterface();
28 28
29 // Resource overrides. 29 // Resource overrides.
30 Font* AsFont() { return this; } 30 virtual Font* AsFont();
31 31
32 // PPB_Font implementation. 32 // PPB_Font implementation.
33 bool Describe(PP_FontDescription_Dev* description, 33 bool Describe(PP_FontDescription_Dev* description,
34 PP_FontMetrics_Dev* metrics); 34 PP_FontMetrics_Dev* metrics);
35 bool DrawTextAt(PP_Resource image_data, 35 bool DrawTextAt(PP_Resource image_data,
36 const PP_TextRun_Dev* text, 36 const PP_TextRun_Dev* text,
37 const PP_Point* position, 37 const PP_Point* position,
38 uint32_t color, 38 uint32_t color,
39 const PP_Rect* clip, 39 const PP_Rect* clip,
40 bool image_data_is_opaque); 40 bool image_data_is_opaque);
41 int32_t MeasureText(const PP_TextRun_Dev* text); 41 int32_t MeasureText(const PP_TextRun_Dev* text);
42 uint32_t CharacterOffsetForPixel(const PP_TextRun_Dev* text, 42 uint32_t CharacterOffsetForPixel(const PP_TextRun_Dev* text,
43 int32_t pixel_position); 43 int32_t pixel_position);
44 int32_t PixelOffsetForCharacter(const PP_TextRun_Dev* text, 44 int32_t PixelOffsetForCharacter(const PP_TextRun_Dev* text,
45 uint32_t char_offset); 45 uint32_t char_offset);
46 46
47 private: 47 private:
48 scoped_ptr<WebKit::WebFont> font_; 48 scoped_ptr<WebKit::WebFont> font_;
49 }; 49 };
50 50
51 } // namespace pepper 51 } // namespace pepper
52 52
53 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_ 53 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FONT_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_file_system.cc ('k') | webkit/glue/plugins/pepper_font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698