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

Unified Diff: content/browser/renderer_host/pepper/pepper_message_filter.cc

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 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 | « content/browser/renderer_host/pepper/pepper_message_filter.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/pepper_message_filter.cc
diff --git a/content/browser/renderer_host/pepper/pepper_message_filter.cc b/content/browser/renderer_host/pepper/pepper_message_filter.cc
index 11e618d9ad9f4be04e51e66afb68453dde7c215a..648b3a31470c76bb5e802dcff7b92efacd7829fb 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc
@@ -16,7 +16,6 @@
#include "base/process_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
-#include "base/values.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/pepper/pepper_lookup_request.h"
#include "content/browser/renderer_host/pepper/pepper_tcp_server_socket.h"
@@ -28,7 +27,6 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
-#include "content/public/browser/font_list_async.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/site_instance.h"
#include "content/public/common/content_client.h"
@@ -138,8 +136,6 @@ bool PepperMessageFilter::OnMessageReceived(const IPC::Message& msg,
bool* message_was_ok) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(PpapiHostMsg_PPBInstance_GetFontFamilies,
- OnGetFontFamilies)
// TCP messages.
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTCPSocket_Create, OnTCPCreate)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTCPSocket_Connect, OnTCPConnect)
@@ -239,12 +235,6 @@ PepperMessageFilter::~PepperMessageFilter() {
net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
-void PepperMessageFilter::OnGetFontFamilies(IPC::Message* reply_msg) {
- GetFontListAsync(
- base::Bind(&PepperMessageFilter::GetFontFamiliesComplete,
- this, reply_msg));
-}
-
void PepperMessageFilter::OnTCPCreate(int32 routing_id,
uint32 plugin_dispatcher_id,
uint32* socket_id) {
@@ -698,37 +688,6 @@ void PepperMessageFilter::OnX509CertificateParseDER(
result);
}
-void PepperMessageFilter::GetFontFamiliesComplete(
- IPC::Message* reply_msg,
- scoped_ptr<base::ListValue> result) {
- std::string output;
- // If this is a NaCl plugin without private permission, we return an empty
- // string in |output|. We must reply to the message.
- if (process_type_ != NACL ||
- permissions_.HasPermission(ppapi::PERMISSION_PRIVATE)) {
- for (size_t i = 0; i < result->GetSize(); i++) {
- base::ListValue* cur_font;
- if (!result->GetList(i, &cur_font))
- continue;
-
- // Each entry is actually a list of (font name, localized name).
- // We only care about the regular name.
- std::string font_name;
- if (!cur_font->GetString(0, &font_name))
- continue;
-
- // Font names are separated with nulls. We also want an explicit null at
- // the end of the string (Pepper strings aren't null terminated so since
- // we specify there will be a null, it should actually be in the string).
- output.append(font_name);
- output.push_back(0);
- }
- }
-
- PpapiHostMsg_PPBInstance_GetFontFamilies::WriteReplyParams(reply_msg, output);
- Send(reply_msg);
-}
-
uint32 PepperMessageFilter::GenerateSocketID() {
// TODO(yzshen): Change to use Pepper resource ID as socket ID.
//
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_message_filter.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698