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

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

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_font.h ('k') | webkit/glue/plugins/pepper_scrollbar.h » ('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 #include "webkit/glue/plugins/pepper_font.h" 5 #include "webkit/glue/plugins/pepper_font.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ppapi/c/dev/ppb_font_dev.h" 9 #include "ppapi/c/dev/ppb_font_dev.h"
10 #include "ppapi/c/pp_rect.h" 10 #include "ppapi/c/pp_rect.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 Font::~Font() { 194 Font::~Font() {
195 } 195 }
196 196
197 // static 197 // static
198 const PPB_Font_Dev* Font::GetInterface() { 198 const PPB_Font_Dev* Font::GetInterface() {
199 return &ppb_font; 199 return &ppb_font;
200 } 200 }
201 201
202 Font* Font::AsFont() {
203 return this;
204 }
205
202 bool Font::Describe(PP_FontDescription_Dev* description, 206 bool Font::Describe(PP_FontDescription_Dev* description,
203 PP_FontMetrics_Dev* metrics) { 207 PP_FontMetrics_Dev* metrics) {
204 if (description->face.type != PP_VARTYPE_UNDEFINED) 208 if (description->face.type != PP_VARTYPE_UNDEFINED)
205 return false; 209 return false;
206 210
207 WebFontDescription web_desc = font_->fontDescription(); 211 WebFontDescription web_desc = font_->fontDescription();
208 212
209 // While converting the other way in PPFontDescToWebFontDesc we validated 213 // While converting the other way in PPFontDescToWebFontDesc we validated
210 // that the enums can be casted. 214 // that the enums can be casted.
211 description->face = StringVar::StringToPPVar(module(), 215 description->face = StringVar::StringToPPVar(module(),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return -1; 289 return -1;
286 if (char_offset >= run.text.length()) 290 if (char_offset >= run.text.length())
287 return -1; 291 return -1;
288 292
289 WebFloatRect rect = font_->selectionRectForText( 293 WebFloatRect rect = font_->selectionRectForText(
290 run, WebFloatPoint(0.0f, 0.0f), font_->height(), 0, char_offset); 294 run, WebFloatPoint(0.0f, 0.0f), font_->height(), 0, char_offset);
291 return static_cast<int>(rect.width); 295 return static_cast<int>(rect.width);
292 } 296 }
293 297
294 } // namespace pepper 298 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_font.h ('k') | webkit/glue/plugins/pepper_scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698