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

Unified Diff: ppapi/shared_impl/ppb_font_shared.cc

Issue 8824015: Revert 113290 - Rename the shared_impl resource files to give them more regular names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/ppb_font_shared.h ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_font_shared.cc
===================================================================
--- ppapi/shared_impl/ppb_font_shared.cc (revision 113301)
+++ ppapi/shared_impl/ppb_font_shared.cc (working copy)
@@ -1,35 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/shared_impl/ppb_font_shared.h"
-
-#include "ppapi/c/dev/ppb_font_dev.h"
-
-namespace ppapi {
-
-// static
-bool PPB_Font_Shared::IsPPFontDescriptionValid(
- const PP_FontDescription_Dev& desc) {
- // Check validity of string. We can't check the actual text since we could
- // be on the wrong thread and don't know if we're in the plugin or the host.
- if (desc.face.type != PP_VARTYPE_STRING &&
- desc.face.type != PP_VARTYPE_UNDEFINED)
- return false;
-
- // Check enum ranges.
- if (static_cast<int>(desc.family) < PP_FONTFAMILY_DEFAULT ||
- static_cast<int>(desc.family) > PP_FONTFAMILY_MONOSPACE)
- return false;
- if (static_cast<int>(desc.weight) < PP_FONTWEIGHT_100 ||
- static_cast<int>(desc.weight) > PP_FONTWEIGHT_900)
- return false;
-
- // Check for excessive sizes which may cause layout to get confused.
- if (desc.size > 200)
- return false;
-
- return true;
-}
-
-} // namespace ppapi
« no previous file with comments | « ppapi/shared_impl/ppb_font_shared.h ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698