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

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

Issue 7623018: Move host resource from the proxy to the shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 4 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
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.h ('k') | ppapi/proxy/ppb_graphics_2d_proxy.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) 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"
11 #include "ppapi/proxy/ppapi_messages.h" 11 #include "ppapi/proxy/ppapi_messages.h"
12 #include "ppapi/proxy/ppb_image_data_proxy.h" 12 #include "ppapi/proxy/ppb_image_data_proxy.h"
13 #include "ppapi/proxy/serialized_var.h" 13 #include "ppapi/proxy/serialized_var.h"
14 #include "ppapi/shared_impl/ppapi_preferences.h" 14 #include "ppapi/shared_impl/ppapi_preferences.h"
15 #include "ppapi/shared_impl/resource_object_base.h" 15 #include "ppapi/shared_impl/resource_object_base.h"
16 #include "ppapi/shared_impl/var.h" 16 #include "ppapi/shared_impl/var.h"
17 #include "ppapi/thunk/enter.h" 17 #include "ppapi/thunk/enter.h"
18 #include "ppapi/thunk/ppb_image_data_api.h" 18 #include "ppapi/thunk/ppb_image_data_api.h"
19 #include "ppapi/thunk/thunk.h" 19 #include "ppapi/thunk/thunk.h"
20 20
21 using ppapi::HostResource;
21 using ppapi::StringVar; 22 using ppapi::StringVar;
22 using ppapi::thunk::EnterResourceNoLock; 23 using ppapi::thunk::EnterResourceNoLock;
23 using ppapi::thunk::PPB_ImageData_API; 24 using ppapi::thunk::PPB_ImageData_API;
24 using ppapi::WebKitForwarding; 25 using ppapi::WebKitForwarding;
25 26
26 namespace pp { 27 namespace pp {
27 namespace proxy { 28 namespace proxy {
28 29
29 namespace { 30 namespace {
30 31
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 112 }
112 113
113 Font::~Font() { 114 Font::~Font() {
114 RunOnWebKitThread(false, base::Bind(&DeleteFontForwarding, font_forwarding_)); 115 RunOnWebKitThread(false, base::Bind(&DeleteFontForwarding, font_forwarding_));
115 } 116 }
116 117
117 ppapi::thunk::PPB_Font_API* Font::AsPPB_Font_API() { 118 ppapi::thunk::PPB_Font_API* Font::AsPPB_Font_API() {
118 return this; 119 return this;
119 } 120 }
120 121
121 Font* Font::AsFont() {
122 return this;
123 }
124
125 PP_Bool Font::Describe(PP_FontDescription_Dev* description, 122 PP_Bool Font::Describe(PP_FontDescription_Dev* description,
126 PP_FontMetrics_Dev* metrics) { 123 PP_FontMetrics_Dev* metrics) {
127 TRACE_EVENT0("ppapi proxy", "Font::Describe"); 124 TRACE_EVENT0("ppapi proxy", "Font::Describe");
128 std::string face; 125 std::string face;
129 PP_Bool result = PP_FALSE; 126 PP_Bool result = PP_FALSE;
130 RunOnWebKitThread(true, 127 RunOnWebKitThread(true,
131 base::Bind(&WebKitForwarding::Font::Describe, 128 base::Bind(&WebKitForwarding::Font::Describe,
132 base::Unretained(font_forwarding_), 129 base::Unretained(font_forwarding_),
133 &webkit_event_, description, &face, metrics, 130 &webkit_event_, description, &face, metrics,
134 &result)); 131 &result));
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 227 }
231 228
232 // static 229 // static
233 void Font::DeleteFontForwarding( 230 void Font::DeleteFontForwarding(
234 ppapi::WebKitForwarding::Font* font_forwarding) { 231 ppapi::WebKitForwarding::Font* font_forwarding) {
235 delete font_forwarding; 232 delete font_forwarding;
236 } 233 }
237 234
238 } // namespace proxy 235 } // namespace proxy
239 } // namespace pp 236 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.h ('k') | ppapi/proxy/ppb_graphics_2d_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698