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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 10826026: Add a printing resource (as a new style resource) to fetch the default print settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/printing_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 01fae690f1946aecbefb4d406ce9c6250c91fe1c..8ea3702f4135ffc83bb1d38fb97857ad1d8f702c 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -133,8 +133,6 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnHostMsgLockMouse)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_UnlockMouse,
OnHostMsgUnlockMouse)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBPInstance_GetDefaultPrintSettings,
- OnHostMsgGetDefaultPrintSettings)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetCursor,
OnHostMsgSetCursor)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetTextInputType,
@@ -610,19 +608,6 @@ void PPB_Instance_Proxy::UnlockMouse(PP_Instance instance) {
API_ID_PPB_INSTANCE, instance));
}
-PP_Bool PPB_Instance_Proxy::GetDefaultPrintSettings(
- PP_Instance instance,
- PP_PrintSettings_Dev* print_settings) {
- if (!print_settings)
- return PP_FALSE;
-
- bool result;
- dispatcher()->Send(new PpapiHostMsg_PPBPInstance_GetDefaultPrintSettings(
- API_ID_PPB_INSTANCE, instance, print_settings, &result));
-
- return PP_FromBool(result);
-}
-
void PPB_Instance_Proxy::SetTextInputType(PP_Instance instance,
PP_TextInput_Type type) {
CancelAnyPendingRequestSurroundingText(instance);
@@ -821,29 +806,6 @@ void PPB_Instance_Proxy::OnHostMsgUnlockMouse(PP_Instance instance) {
enter.functions()->UnlockMouse(instance);
}
-void PPB_Instance_Proxy::OnHostMsgGetDefaultPrintSettings(
- PP_Instance instance,
- PP_PrintSettings_Dev* settings,
- bool* result) {
- // TODO(raymes): This just returns some generic settings. Actually hook this
- // up to the browser to return the real defaults.
- PP_PrintSettings_Dev default_settings = {
- // |printable_area|: all of the sheet of paper.
- { { 0, 0 }, { 612, 792 } },
- // |content_area|: 0.5" margins all around.
- { { 36, 36 }, { 540, 720 } },
- // |paper_size|: 8.5" x 11" (US letter).
- { 612, 792 },
- 300, // |dpi|.
- PP_PRINTORIENTATION_NORMAL, // |orientation|.
- PP_PRINTSCALINGOPTION_NONE, // |print_scaling_option|.
- PP_FALSE, // |grayscale|.
- PP_PRINTOUTPUTFORMAT_PDF // |format|.
- };
- *settings = default_settings;
- *result = true;
-}
-
#if !defined(OS_NACL)
void PPB_Instance_Proxy::OnHostMsgResolveRelativeToDocument(
PP_Instance instance,
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/printing_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698