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

Side by Side Diff: webkit/plugins/ppapi/ppb_font_impl.cc

Issue 7053022: Use the WebKit default fonts when specifying generic font families. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
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 "webkit/plugins/ppapi/ppb_font_impl.h" 5 #include "webkit/plugins/ppapi/ppb_font_impl.h"
6 6
7 #include "ppapi/c/dev/ppb_font_dev.h" 7 #include "ppapi/c/dev/ppb_font_dev.h"
8 #include "ppapi/shared_impl/ppapi_preferences.h"
8 #include "ppapi/thunk/thunk.h" 9 #include "ppapi/thunk/thunk.h"
9 #include "webkit/plugins/ppapi/common.h" 10 #include "webkit/plugins/ppapi/common.h"
10 #include "webkit/plugins/ppapi/plugin_module.h" 11 #include "webkit/plugins/ppapi/plugin_module.h"
11 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 12 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
12 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 13 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
13 #include "webkit/plugins/ppapi/string.h" 14 #include "webkit/plugins/ppapi/string.h"
14 #include "webkit/plugins/ppapi/var.h" 15 #include "webkit/plugins/ppapi/var.h"
15 16
16 using ::ppapi::WebKitForwarding; 17 using ::ppapi::WebKitForwarding;
17 18
(...skipping 18 matching lines...) Expand all
36 37
37 } // namespace 38 } // namespace
38 39
39 PPB_Font_Impl::PPB_Font_Impl(PluginInstance* instance, 40 PPB_Font_Impl::PPB_Font_Impl(PluginInstance* instance,
40 const PP_FontDescription_Dev& desc) 41 const PP_FontDescription_Dev& desc)
41 : Resource(instance) { 42 : Resource(instance) {
42 scoped_refptr<StringVar> face_name(StringVar::FromPPVar(desc.face)); 43 scoped_refptr<StringVar> face_name(StringVar::FromPPVar(desc.face));
43 44
44 WebKitForwarding::Font* result = NULL; 45 WebKitForwarding::Font* result = NULL;
45 instance->module()->GetWebKitForwarding()->CreateFontForwarding( 46 instance->module()->GetWebKitForwarding()->CreateFontForwarding(
46 NULL, desc, face_name ? face_name->value() : std::string(), &result); 47 NULL, desc, face_name ? face_name->value() : std::string(),
48 instance->delegate()->GetPreferences(), &result);
47 font_forwarding_.reset(result); 49 font_forwarding_.reset(result);
48 } 50 }
49 51
50 PPB_Font_Impl::~PPB_Font_Impl() { 52 PPB_Font_Impl::~PPB_Font_Impl() {
51 } 53 }
52 54
53 ::ppapi::thunk::PPB_Font_API* PPB_Font_Impl::AsFont_API() { 55 ::ppapi::thunk::PPB_Font_API* PPB_Font_Impl::AsFont_API() {
54 return this; 56 return this;
55 } 57 }
56 58
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return this; 138 return this;
137 } 139 }
138 140
139 PP_Var PPB_Font_FunctionImpl::GetFontFamilies(PP_Instance instance) { 141 PP_Var PPB_Font_FunctionImpl::GetFontFamilies(PP_Instance instance) {
140 return PP_MakeUndefined(); 142 return PP_MakeUndefined();
141 } 143 }
142 144
143 } // namespace ppapi 145 } // namespace ppapi
144 } // namespace webkit 146 } // namespace webkit
145 147
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698