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

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

Issue 10795051: Implement asynchronous interface/plumbing for GetDefaultPrintSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
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 924176379ca38cfb751c9042ecd9c094fd42309c..793bd05e41ae5b4dd0fbd3c5ea1e16ff1b855395 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc
@@ -37,6 +37,7 @@
#include "net/base/cert_verifier.h"
#include "net/base/host_port_pair.h"
#include "net/base/sys_addrinfo.h"
+#include "ppapi/c/dev/pp_print_settings_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_host_resolver_private.h"
#include "ppapi/c/private/ppb_net_address_private.h"
@@ -114,7 +115,8 @@ void PepperMessageFilter::OverrideThreadForMessage(
message.type() == PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress::ID ||
message.type() == PpapiHostMsg_PPBUDPSocket_Bind::ID ||
message.type() == PpapiHostMsg_PPBTCPServerSocket_Listen::ID ||
- message.type() == PpapiHostMsg_PPBHostResolver_Resolve::ID) {
+ message.type() == PpapiHostMsg_PPBHostResolver_Resolve::ID ||
+ message.type() == PpapiHostMsg_PPBPInstance_GetDefaultPrintSettings::ID) {
*thread = BrowserThread::UI;
} else if (message.type() == PepperMsg_GetDeviceID::ID ||
message.type() == PpapiHostMsg_PPBFlashDeviceID_Get::ID) {
@@ -183,6 +185,10 @@ if (process_type_ == PLUGIN) {
IPC_MESSAGE_HANDLER(PepperMsg_GetDeviceID, OnGetDeviceID)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashDeviceID_Get, OnGetDeviceIDAsync)
+ // PPBInstance messages.
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBPInstance_GetDefaultPrintSettings,
+ OnGetDefaultPrintSettings);
+
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
return handled;
@@ -714,6 +720,15 @@ void PepperMessageFilter::OnGetDeviceIDAsync(int32_t routing_id,
result));
}
+void PepperMessageFilter::OnGetDefaultPrintSettings(int32_t routing_id,
+ PP_Instance instance) {
+ PP_PrintSettings_Dev settings;
dmichael (off chromium) 2012/07/23 18:20:09 Previously, you filled in some reasonable defaults
raymes 2012/07/24 00:37:08 This is only used by the new version of the API so
+ int32_t result;
+ // TODO(raymes): Actually get the settings here.
+ Send(new PpapiMsg_PPBInstance_GetDefaultPrintSettingsComplete(
+ ppapi::API_ID_PPB_INSTANCE, routing_id, instance, settings, result));
+}
+
void PepperMessageFilter::GetFontFamiliesComplete(
IPC::Message* reply_msg,
scoped_ptr<base::ListValue> result) {

Powered by Google App Engine
This is Rietveld 408576698