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

Side by Side Diff: ppapi/proxy/ppb_font_proxy.cc

Issue 8487001: Remove 13 exit time constructors and 3 static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 1 month 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 | « ppapi/proxy/ppb_core_proxy.cc ('k') | printing/backend/print_backend_cups.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 #include "ppapi/proxy/ppb_font_proxy.h" 5 #include "ppapi/proxy/ppb_font_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ppapi/c/dev/ppb_font_dev.h" 9 #include "ppapi/c/dev/ppb_font_dev.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 PPB_Font_FunctionAPI* PPB_Font_Proxy::AsPPB_Font_FunctionAPI() { 52 PPB_Font_FunctionAPI* PPB_Font_Proxy::AsPPB_Font_FunctionAPI() {
53 return this; 53 return this;
54 } 54 }
55 55
56 PP_Var PPB_Font_Proxy::GetFontFamilies(PP_Instance instance) { 56 PP_Var PPB_Font_Proxy::GetFontFamilies(PP_Instance instance) {
57 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 57 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
58 if (!dispatcher) 58 if (!dispatcher)
59 return PP_MakeUndefined(); 59 return PP_MakeUndefined();
60 60
61 // Assume the font families don't change, so we can cache the result globally. 61 // Assume the font families don't change, so we can cache the result globally.
62 static std::string families; 62 CR_DEFINE_STATIC_LOCAL(std::string, families, ());
63 if (families.empty()) { 63 if (families.empty()) {
64 dispatcher->SendToBrowser( 64 dispatcher->SendToBrowser(
65 new PpapiHostMsg_PPBFont_GetFontFamilies(&families)); 65 new PpapiHostMsg_PPBFont_GetFontFamilies(&families));
66 } 66 }
67 67
68 return StringVar::StringToPPVar(0, families); 68 return StringVar::StringToPPVar(0, families);
69 } 69 }
70 70
71 bool PPB_Font_Proxy::OnMessageReceived(const IPC::Message& msg) { 71 bool PPB_Font_Proxy::OnMessageReceived(const IPC::Message& msg) {
72 // There aren't any font messages. 72 // There aren't any font messages.
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 webkit_event_.Wait(); 219 webkit_event_.Wait();
220 } 220 }
221 221
222 // static 222 // static
223 void Font::DeleteFontForwarding(WebKitForwarding::Font* font_forwarding) { 223 void Font::DeleteFontForwarding(WebKitForwarding::Font* font_forwarding) {
224 delete font_forwarding; 224 delete font_forwarding;
225 } 225 }
226 226
227 } // namespace proxy 227 } // namespace proxy
228 } // namespace ppapi 228 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_core_proxy.cc ('k') | printing/backend/print_backend_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698