summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-24 19:16:45 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-24 19:16:45 +0000
commit2acf7ce7bf1917dc59769411ad2657dffc47c3a0 (patch)
treef3a65eb5dd33f146d0ba5aa2901ee2f5610109ad /ppapi/thunk
parente29d0ac91c9834d0993281ef453c3342dae26800 (diff)
downloadchromium_src-2acf7ce7bf1917dc59769411ad2657dffc47c3a0.zip
chromium_src-2acf7ce7bf1917dc59769411ad2657dffc47c3a0.tar.gz
chromium_src-2acf7ce7bf1917dc59769411ad2657dffc47c3a0.tar.bz2
Pepper: Remove verson 0.6 of PPB_Printing_Dev.
This is a deprecated dev interface that's had a replacement shipped in M23. There's a test for source compatability that will catch any problems if they exist with flash source code (which I don't have access to). Removing this interface lets us get rid of some cruft and autogenerate the thunk for PPB_Printing_Dev. Tested: Built browser_tests and chrome. R=raymes BUG= Review URL: https://chromiumcodereview.appspot.com/13852040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev.h2
-rw-r--r--ppapi/thunk/ppb_printing_dev_thunk.cc54
-rw-r--r--ppapi/thunk/ppb_printing_thunk.cc79
3 files changed, 54 insertions, 81 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h
index 54422a2..c8f1ae7 100644
--- a/ppapi/thunk/interfaces_ppb_public_dev.h
+++ b/ppapi/thunk/interfaces_ppb_public_dev.h
@@ -67,8 +67,6 @@ PROXIED_IFACE(NoAPIName, PPB_GRAPHICS2D_DEV_INTERFACE_0_1,
PPB_Graphics2D_Dev_0_1)
PROXIED_IFACE(PPB_Instance, PPB_CHAR_SET_DEV_INTERFACE_0_4, PPB_CharSet_Dev_0_4)
PROXIED_IFACE(PPB_Instance, PPB_URLUTIL_DEV_INTERFACE_0_6, PPB_URLUtil_Dev_0_6)
-PROXIED_IFACE(PPB_Instance, PPB_PRINTING_DEV_INTERFACE_0_6,
- PPB_Printing_Dev_0_6)
UNPROXIED_IFACE(PPB_Scrollbar, PPB_SCROLLBAR_DEV_INTERFACE_0_5,
PPB_Scrollbar_Dev_0_5)
PROXIED_IFACE(PPB_Instance, PPB_TEXTINPUT_DEV_INTERFACE_0_1,
diff --git a/ppapi/thunk/ppb_printing_dev_thunk.cc b/ppapi/thunk/ppb_printing_dev_thunk.cc
new file mode 100644
index 0000000..117ef17
--- /dev/null
+++ b/ppapi/thunk/ppb_printing_dev_thunk.cc
@@ -0,0 +1,54 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// From dev/ppb_printing_dev.idl modified Fri Apr 19 10:45:09 2013.
+
+#include "ppapi/c/dev/ppb_printing_dev.h"
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/shared_impl/tracked_callback.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/ppb_printing_api.h"
+#include "ppapi/thunk/resource_creation_api.h"
+#include "ppapi/thunk/thunk.h"
+
+namespace ppapi {
+namespace thunk {
+
+namespace {
+
+PP_Resource Create(PP_Instance instance) {
+ VLOG(4) << "PPB_Printing_Dev::Create()";
+ EnterResourceCreation enter(instance);
+ if (enter.failed())
+ return 0;
+ return enter.functions()->CreatePrinting(instance);
+}
+
+int32_t GetDefaultPrintSettings(PP_Resource resource,
+ struct PP_PrintSettings_Dev* print_settings,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_Printing_Dev::GetDefaultPrintSettings()";
+ EnterResource<PPB_Printing_API> enter(resource, callback, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(enter.object()->GetDefaultPrintSettings(
+ print_settings,
+ enter.callback()));
+}
+
+const PPB_Printing_Dev_0_7 g_ppb_printing_dev_thunk_0_7 = {
+ &Create,
+ &GetDefaultPrintSettings
+};
+
+} // namespace
+
+const PPB_Printing_Dev_0_7* GetPPB_Printing_Dev_0_7_Thunk() {
+ return &g_ppb_printing_dev_thunk_0_7;
+}
+
+} // namespace thunk
+} // namespace ppapi
diff --git a/ppapi/thunk/ppb_printing_thunk.cc b/ppapi/thunk/ppb_printing_thunk.cc
deleted file mode 100644
index 2fc34e3..0000000
--- a/ppapi/thunk/ppb_printing_thunk.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/c/dev/pp_print_settings_dev.h"
-#include "ppapi/c/dev/ppb_printing_dev.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_printing_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-PP_Bool GetDefaultPrintSettings_0_6(PP_Instance instance,
- PP_PrintSettings_Dev* print_settings) {
- // TODO(raymes): This is obsolete now. Just return some default settings.
- // Remove this when all versions of Flash we care about are no longer using
- // it.
- 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|.
- };
- *print_settings = default_settings;
- return PP_TRUE;
-}
-
-PP_Resource Create(PP_Instance instance) {
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreatePrinting(instance);
-}
-
-int32_t GetDefaultPrintSettings(PP_Resource resource,
- PP_PrintSettings_Dev* print_settings,
- PP_CompletionCallback callback) {
- EnterResource<PPB_Printing_API> enter(resource, callback, true);
- if (enter.failed())
- return enter.retval();
- return enter.SetResult(
- enter.object()->GetDefaultPrintSettings(print_settings,
- enter.callback()));
-}
-
-const PPB_Printing_Dev_0_6 g_ppb_printing_dev_thunk_0_6 = {
- &GetDefaultPrintSettings_0_6,
-};
-
-const PPB_Printing_Dev g_ppb_printing_dev_thunk_0_7 = {
- &Create,
- &GetDefaultPrintSettings,
-};
-
-} // namespace
-
-const PPB_Printing_Dev_0_6* GetPPB_Printing_Dev_0_6_Thunk() {
- return &g_ppb_printing_dev_thunk_0_6;
-}
-
-const PPB_Printing_Dev_0_7* GetPPB_Printing_Dev_0_7_Thunk() {
- return &g_ppb_printing_dev_thunk_0_7;
-}
-
-} // namespace thunk
-} // namespace ppapi