From 994380bfb0056cd5744ead4e7d5018bc17542235 Mon Sep 17 00:00:00 2001 From: raymes Date: Thu, 28 May 2015 18:31:53 -0700 Subject: Remove unused in-process pepper APIs Several APIs are now unused after turning on OOP PDF. This removes: Selection_Dev Widget_Dev Scrollbar_Dev Zoom_Dev These APIs only work in-process so we can be sure they aren't used by existing plugins (except possibly the NaCl plugin but they aren't used by that either). BUG=303491 Review URL: https://codereview.chromium.org/1161563002 Cr-Commit-Position: refs/heads/master@{#331904} --- ppapi/api/dev/ppb_scrollbar_dev.idl | 82 ---------------- ppapi/api/dev/ppb_widget_dev.idl | 63 ------------ ppapi/api/dev/ppb_zoom_dev.idl | 36 ------- ppapi/api/dev/ppp_scrollbar_dev.idl | 31 ------ ppapi/api/dev/ppp_selection_dev.idl | 22 ----- ppapi/api/dev/ppp_widget_dev.idl | 26 ----- ppapi/api/dev/ppp_zoom_dev.idl | 27 ------ ppapi/c/dev/ppb_scrollbar_dev.h | 106 --------------------- ppapi/c/dev/ppb_widget_dev.h | 84 ---------------- ppapi/c/dev/ppb_zoom_dev.h | 54 ----------- ppapi/c/dev/ppp_scrollbar_dev.h | 59 ------------ ppapi/c/dev/ppp_selection_dev.h | 45 --------- ppapi/c/dev/ppp_widget_dev.h | 50 ---------- ppapi/c/dev/ppp_zoom_dev.h | 47 --------- ppapi/cpp/dev/scrollbar_dev.cc | 87 ----------------- ppapi/cpp/dev/scrollbar_dev.h | 39 -------- ppapi/cpp/dev/selection_dev.cc | 44 --------- ppapi/cpp/dev/selection_dev.h | 52 ---------- ppapi/cpp/dev/widget_client_dev.cc | 88 ----------------- ppapi/cpp/dev/widget_client_dev.h | 52 ---------- ppapi/cpp/dev/widget_dev.cc | 83 ---------------- ppapi/cpp/dev/widget_dev.h | 37 ------- ppapi/cpp/dev/zoom_dev.cc | 62 ------------ ppapi/cpp/dev/zoom_dev.h | 59 ------------ .../src/untrusted/pnacl_irt_shim/pnacl_shim.c | 58 ----------- ppapi/ppapi_shared.gypi | 6 -- ppapi/ppapi_sources.gypi | 19 ---- ppapi/proxy/interface_list.cc | 3 - ppapi/proxy/ppb_instance_proxy.cc | 13 --- ppapi/proxy/ppb_instance_proxy.h | 4 - ppapi/proxy/resource_creation_proxy.cc | 6 -- ppapi/proxy/resource_creation_proxy.h | 2 - ppapi/tests/all_c_includes.h | 7 -- ppapi/tests/all_cpp_includes.h | 5 - ppapi/tests/test_case.h | 1 - ppapi/tests/test_scrollbar.cc | 66 ------------- ppapi/tests/test_scrollbar.h | 36 ------- ppapi/thunk/BUILD.gn | 5 - ppapi/thunk/interfaces_ppb_public_dev.h | 4 - ppapi/thunk/ppb_instance_api.h | 5 - ppapi/thunk/ppb_scrollbar_api.h | 29 ------ ppapi/thunk/ppb_scrollbar_thunk.cc | 95 ------------------ ppapi/thunk/ppb_video_encoder_thunk.cc | 11 +-- ppapi/thunk/ppb_widget_api.h | 27 ------ ppapi/thunk/ppb_widget_dev_thunk.cc | 87 ----------------- ppapi/thunk/ppb_zoom_dev_thunk.cc | 47 --------- ppapi/thunk/resource_creation_api.h | 2 - 47 files changed, 4 insertions(+), 1869 deletions(-) delete mode 100644 ppapi/api/dev/ppb_scrollbar_dev.idl delete mode 100644 ppapi/api/dev/ppb_widget_dev.idl delete mode 100644 ppapi/api/dev/ppb_zoom_dev.idl delete mode 100644 ppapi/api/dev/ppp_scrollbar_dev.idl delete mode 100644 ppapi/api/dev/ppp_selection_dev.idl delete mode 100644 ppapi/api/dev/ppp_widget_dev.idl delete mode 100644 ppapi/api/dev/ppp_zoom_dev.idl delete mode 100644 ppapi/c/dev/ppb_scrollbar_dev.h delete mode 100644 ppapi/c/dev/ppb_widget_dev.h delete mode 100644 ppapi/c/dev/ppb_zoom_dev.h delete mode 100644 ppapi/c/dev/ppp_scrollbar_dev.h delete mode 100644 ppapi/c/dev/ppp_selection_dev.h delete mode 100644 ppapi/c/dev/ppp_widget_dev.h delete mode 100644 ppapi/c/dev/ppp_zoom_dev.h delete mode 100644 ppapi/cpp/dev/scrollbar_dev.cc delete mode 100644 ppapi/cpp/dev/scrollbar_dev.h delete mode 100644 ppapi/cpp/dev/selection_dev.cc delete mode 100644 ppapi/cpp/dev/selection_dev.h delete mode 100644 ppapi/cpp/dev/widget_client_dev.cc delete mode 100644 ppapi/cpp/dev/widget_client_dev.h delete mode 100644 ppapi/cpp/dev/widget_dev.cc delete mode 100644 ppapi/cpp/dev/widget_dev.h delete mode 100644 ppapi/cpp/dev/zoom_dev.cc delete mode 100644 ppapi/cpp/dev/zoom_dev.h delete mode 100644 ppapi/tests/test_scrollbar.cc delete mode 100644 ppapi/tests/test_scrollbar.h delete mode 100644 ppapi/thunk/ppb_scrollbar_api.h delete mode 100644 ppapi/thunk/ppb_scrollbar_thunk.cc delete mode 100644 ppapi/thunk/ppb_widget_api.h delete mode 100644 ppapi/thunk/ppb_widget_dev_thunk.cc delete mode 100644 ppapi/thunk/ppb_zoom_dev_thunk.cc (limited to 'ppapi') diff --git a/ppapi/api/dev/ppb_scrollbar_dev.idl b/ppapi/api/dev/ppb_scrollbar_dev.idl deleted file mode 100644 index e06711d..0000000 --- a/ppapi/api/dev/ppb_scrollbar_dev.idl +++ /dev/null @@ -1,82 +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. - */ - -/** - * This file defines the PPB_Buffer_Dev interface. - */ -label Chrome { - M14 = 0.5 -}; - -[assert_size(4)] -enum PP_ScrollBy_Dev { - PP_SCROLLBY_PIXEL = 0, - PP_SCROLLBY_LINE = 1, - PP_SCROLLBY_PAGE = 2, - PP_SCROLLBY_DOCUMENT = 3 -}; - -/** - * The interface for a scrollbar. A scrollbar is a widget, so the functions - * in PPB_Widget can also be used with scrollbar objects. - */ -interface PPB_Scrollbar_Dev { - /** - * Create a new scrollbar. Returns 0 if the instance is invalid. - */ - PP_Resource Create([in] PP_Instance instance, - [in] PP_Bool vertical); - - /** - * Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if - * the resource is invalid or some type other than a scrollbar. - */ - PP_Bool IsScrollbar([in] PP_Resource resource); - - /** - * Gets the thickness of a scrollbar. - */ - uint32_t GetThickness([in] PP_Resource resource); - - /** - * Returns PP_TRUE if the system scrollbar style is an overlap scrollbar. - */ - PP_Bool IsOverlay([in] PP_Resource scrollbar); - - /** - * Gets the value of the scrollbar. - */ - uint32_t GetValue([in] PP_Resource scrollbar); - - /** - * Sets the value of the scrollbar. - */ - void SetValue([in] PP_Resource scrollbar, - [in] uint32_t value); - - /** - * Set the document size (i.e. total length of the region that's being - * scrolled). - */ - void SetDocumentSize([in] PP_Resource scrollbar, - [in] uint32_t size); - - /** - * Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks" - * contains "count" PP_Rect objects. - */ - void SetTickMarks([in] PP_Resource scrollbar, - [in, size_as=count] PP_Rect[] tick_marks, - [in] uint32_t count); - - /** - * Scroll by "multiplier" pixels/lines/pages units. Positive values are - * forward and negative are backward. If "unit" is document then any positive - * value goes to the end while any negative value goes to the beginning. - */ - void ScrollBy([in] PP_Resource scrollbar, - [in] PP_ScrollBy_Dev unit, - [in] int32_t multiplier); -}; diff --git a/ppapi/api/dev/ppb_widget_dev.idl b/ppapi/api/dev/ppb_widget_dev.idl deleted file mode 100644 index c26cb4e..0000000 --- a/ppapi/api/dev/ppb_widget_dev.idl +++ /dev/null @@ -1,63 +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. - */ - -/** - * Implementation of the widgets interface. - */ - -[generate_thunk] - -label Chrome { - M14 = 0.3, - M23 = 0.4 -}; - -/** - * The interface for reusing browser widgets. - */ -interface PPB_Widget_Dev { - /** - * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the - * resource is invalid or some type other than an Widget. - */ - PP_Bool IsWidget([in] PP_Resource resource); - - /** - * Paint the given rectangle of the widget into the given image. - * Returns PP_TRUE on success, PP_FALSE on failure. - */ - [report_errors=False] - PP_Bool Paint([in] PP_Resource widget, - [in] PP_Rect rect, - [in] PP_Resource image); - - /** - * Pass in an event to a widget. It'll return PP_TRUE if the event was - * consumed. - */ - [report_errors=False] - PP_Bool HandleEvent([in] PP_Resource widget, [in] PP_Resource input_event); - - /** - * Get the location of the widget. - */ - [report_errors=False] - PP_Bool GetLocation([in] PP_Resource widget, - [out] PP_Rect location); - - /** - * Set the location of the widget. - */ - [report_errors=False] - void SetLocation([in] PP_Resource widget, - [in] PP_Rect location); - - /** - * Set scale used during paint operations. - */ - [version=0.4, report_errors=False] - void SetScale([in] PP_Resource widget, - [in] float_t scale); -}; diff --git a/ppapi/api/dev/ppb_zoom_dev.idl b/ppapi/api/dev/ppb_zoom_dev.idl deleted file mode 100644 index 8e03bd0..0000000 --- a/ppapi/api/dev/ppb_zoom_dev.idl +++ /dev/null @@ -1,36 +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. - */ - -/** - * Implementation of the Zoom interface. - */ - -[generate_thunk] - -label Chrome { - M14 = 0.2 -}; - -/** - * Zoom interface should only apply to those full-page "plugin-document". - */ -interface PPB_Zoom_Dev { - /** - * Informs the browser about the new zoom factor for the plugin (see - * ppp_zoom_dev.h for a description of zoom factor). The plugin should only - * call this function if the zoom change was triggered by the browser, it's - * only needed in case a plugin can update its own zoom, say because of its - * own UI. - */ - void ZoomChanged([in] PP_Instance instance, - [in] double_t factor); - /** - * Sets the minimum and maximum zoom factors. - */ - void ZoomLimitsChanged([in] PP_Instance instance, - [in] double_t minimum_factor, - [in] double_t maximum_factor); -}; - diff --git a/ppapi/api/dev/ppp_scrollbar_dev.idl b/ppapi/api/dev/ppp_scrollbar_dev.idl deleted file mode 100644 index 28e9681..0000000 --- a/ppapi/api/dev/ppp_scrollbar_dev.idl +++ /dev/null @@ -1,31 +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. - */ - -/** - * This file defines the PPP_Scrollbar_Dev interface. - */ - -label Chrome { - M13 = 0.2, - M16 = 0.3 -}; - -interface PPP_Scrollbar_Dev { - /** - * Informs the instance that the scrollbar's value has changed. - */ - void ValueChanged([in] PP_Instance instance, - [in] PP_Resource scrollbar, - [in] uint32_t value); - - /** - * Informs the instance that the user has changed the system - * scrollbar style. - */ - [version=0.3] - void OverlayChanged([in] PP_Instance instance, - [in] PP_Resource scrollbar, - [in] PP_Bool overlay); -}; diff --git a/ppapi/api/dev/ppp_selection_dev.idl b/ppapi/api/dev/ppp_selection_dev.idl deleted file mode 100644 index 1d89789..0000000 --- a/ppapi/api/dev/ppp_selection_dev.idl +++ /dev/null @@ -1,22 +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. - */ - -/** - * This file defines the PPP_Selection_Dev interface. - */ - -label Chrome { - M13 = 0.3 -}; - -interface PPP_Selection_Dev { - /** - * Returns the selection, either as plain text or as html depending on "html". - * If nothing is selected, or if the given format is unavailable, return a - * void string. - */ - PP_Var GetSelectedText([in] PP_Instance instance, - [in] PP_Bool html); -}; diff --git a/ppapi/api/dev/ppp_widget_dev.idl b/ppapi/api/dev/ppp_widget_dev.idl deleted file mode 100644 index 18d9ba7c..0000000 --- a/ppapi/api/dev/ppp_widget_dev.idl +++ /dev/null @@ -1,26 +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. - */ - -/** - * Implementation of the Widget interface. - */ - -label Chrome { - M14 = 0.2 -}; - -/** - * The interface for reusing browser widgets. - */ -interface PPP_Widget_Dev { - /** - * Informs the instance that the given rectangle needs to be repainted. - */ - void Invalidate([in] PP_Instance instance, - [in] PP_Resource widget, - [in] PP_Rect dirty_rect); -}; - - diff --git a/ppapi/api/dev/ppp_zoom_dev.idl b/ppapi/api/dev/ppp_zoom_dev.idl deleted file mode 100644 index 2398f75..0000000 --- a/ppapi/api/dev/ppp_zoom_dev.idl +++ /dev/null @@ -1,27 +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. - */ - -/** - * Implementation of the Zoom interface. - */ - -label Chrome { - M14 = 0.3 -}; - -/** - * Zoom interface should only apply to those full-page "plugin-document". - */ -interface PPP_Zoom_Dev { - /** - * Instruct plugin to zoom according to the given factor and whether the zoom - * only applies to text only. The scale factor is the percentage divided by - * 100, i.e. 150% zoom is 1.5. - */ - void Zoom([in] PP_Instance instance, - [in] double_t factor, - [in] PP_Bool text_only); -}; - diff --git a/ppapi/c/dev/ppb_scrollbar_dev.h b/ppapi/c/dev/ppb_scrollbar_dev.h deleted file mode 100644 index 860f372..0000000 --- a/ppapi/c/dev/ppb_scrollbar_dev.h +++ /dev/null @@ -1,106 +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. - */ - -/* From dev/ppb_scrollbar_dev.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ -#define PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_point.h" -#include "ppapi/c/pp_rect.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_size.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_SCROLLBAR_DEV_INTERFACE_0_5 "PPB_Scrollbar(Dev);0.5" -#define PPB_SCROLLBAR_DEV_INTERFACE PPB_SCROLLBAR_DEV_INTERFACE_0_5 - -/** - * @file - * This file defines the PPB_Buffer_Dev interface. - */ - - -/** - * @addtogroup Enums - * @{ - */ -typedef enum { - PP_SCROLLBY_PIXEL = 0, - PP_SCROLLBY_LINE = 1, - PP_SCROLLBY_PAGE = 2, - PP_SCROLLBY_DOCUMENT = 3 -} PP_ScrollBy_Dev; -PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ScrollBy_Dev, 4); -/** - * @} - */ - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * The interface for a scrollbar. A scrollbar is a widget, so the functions - * in PPB_Widget can also be used with scrollbar objects. - */ -struct PPB_Scrollbar_Dev_0_5 { - /** - * Create a new scrollbar. Returns 0 if the instance is invalid. - */ - PP_Resource (*Create)(PP_Instance instance, PP_Bool vertical); - /** - * Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if - * the resource is invalid or some type other than a scrollbar. - */ - PP_Bool (*IsScrollbar)(PP_Resource resource); - /** - * Gets the thickness of a scrollbar. - */ - uint32_t (*GetThickness)(PP_Resource resource); - /** - * Returns PP_TRUE if the system scrollbar style is an overlap scrollbar. - */ - PP_Bool (*IsOverlay)(PP_Resource scrollbar); - /** - * Gets the value of the scrollbar. - */ - uint32_t (*GetValue)(PP_Resource scrollbar); - /** - * Sets the value of the scrollbar. - */ - void (*SetValue)(PP_Resource scrollbar, uint32_t value); - /** - * Set the document size (i.e. total length of the region that's being - * scrolled). - */ - void (*SetDocumentSize)(PP_Resource scrollbar, uint32_t size); - /** - * Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks" - * contains "count" PP_Rect objects. - */ - void (*SetTickMarks)(PP_Resource scrollbar, - const struct PP_Rect tick_marks[], - uint32_t count); - /** - * Scroll by "multiplier" pixels/lines/pages units. Positive values are - * forward and negative are backward. If "unit" is document then any positive - * value goes to the end while any negative value goes to the beginning. - */ - void (*ScrollBy)(PP_Resource scrollbar, - PP_ScrollBy_Dev unit, - int32_t multiplier); -}; - -typedef struct PPB_Scrollbar_Dev_0_5 PPB_Scrollbar_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_widget_dev.h b/ppapi/c/dev/ppb_widget_dev.h deleted file mode 100644 index 7fec378..0000000 --- a/ppapi/c/dev/ppb_widget_dev.h +++ /dev/null @@ -1,84 +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. - */ - -/* From dev/ppb_widget_dev.idl modified Mon Aug 20 10:21:06 2012. */ - -#ifndef PPAPI_C_DEV_PPB_WIDGET_DEV_H_ -#define PPAPI_C_DEV_PPB_WIDGET_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_point.h" -#include "ppapi/c/pp_rect.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_size.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_WIDGET_DEV_INTERFACE_0_3 "PPB_Widget(Dev);0.3" -#define PPB_WIDGET_DEV_INTERFACE_0_4 "PPB_Widget(Dev);0.4" -#define PPB_WIDGET_DEV_INTERFACE PPB_WIDGET_DEV_INTERFACE_0_4 - -/** - * @file - * Implementation of the widgets interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * The interface for reusing browser widgets. - */ -struct PPB_Widget_Dev_0_4 { - /** - * Returns PP_TRUE if the given resource is a Widget. Returns PP_FALSE if the - * resource is invalid or some type other than an Widget. - */ - PP_Bool (*IsWidget)(PP_Resource resource); - /** - * Paint the given rectangle of the widget into the given image. - * Returns PP_TRUE on success, PP_FALSE on failure. - */ - PP_Bool (*Paint)(PP_Resource widget, - const struct PP_Rect* rect, - PP_Resource image); - /** - * Pass in an event to a widget. It'll return PP_TRUE if the event was - * consumed. - */ - PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event); - /** - * Get the location of the widget. - */ - PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location); - /** - * Set the location of the widget. - */ - void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location); - /** - * Set scale used during paint operations. - */ - void (*SetScale)(PP_Resource widget, float scale); -}; - -typedef struct PPB_Widget_Dev_0_4 PPB_Widget_Dev; - -struct PPB_Widget_Dev_0_3 { - PP_Bool (*IsWidget)(PP_Resource resource); - PP_Bool (*Paint)(PP_Resource widget, - const struct PP_Rect* rect, - PP_Resource image); - PP_Bool (*HandleEvent)(PP_Resource widget, PP_Resource input_event); - PP_Bool (*GetLocation)(PP_Resource widget, struct PP_Rect* location); - void (*SetLocation)(PP_Resource widget, const struct PP_Rect* location); -}; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPB_WIDGET_DEV_H_ */ - diff --git a/ppapi/c/dev/ppb_zoom_dev.h b/ppapi/c/dev/ppb_zoom_dev.h deleted file mode 100644 index e8cf4ce..0000000 --- a/ppapi/c/dev/ppb_zoom_dev.h +++ /dev/null @@ -1,54 +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. - */ - -/* From dev/ppb_zoom_dev.idl modified Thu Apr 18 10:24:21 2013. */ - -#ifndef PPAPI_C_DEV_PPB_ZOOM_DEV_H_ -#define PPAPI_C_DEV_PPB_ZOOM_DEV_H_ - -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" - -#define PPB_ZOOM_DEV_INTERFACE_0_2 "PPB_Zoom(Dev);0.2" -#define PPB_ZOOM_DEV_INTERFACE PPB_ZOOM_DEV_INTERFACE_0_2 - -/** - * @file - * Implementation of the Zoom interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * Zoom interface should only apply to those full-page "plugin-document". - */ -struct PPB_Zoom_Dev_0_2 { - /** - * Informs the browser about the new zoom factor for the plugin (see - * ppp_zoom_dev.h for a description of zoom factor). The plugin should only - * call this function if the zoom change was triggered by the browser, it's - * only needed in case a plugin can update its own zoom, say because of its - * own UI. - */ - void (*ZoomChanged)(PP_Instance instance, double factor); - /** - * Sets the minimum and maximum zoom factors. - */ - void (*ZoomLimitsChanged)(PP_Instance instance, - double minimum_factor, - double maximum_factor); -}; - -typedef struct PPB_Zoom_Dev_0_2 PPB_Zoom_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPB_ZOOM_DEV_H_ */ - diff --git a/ppapi/c/dev/ppp_scrollbar_dev.h b/ppapi/c/dev/ppp_scrollbar_dev.h deleted file mode 100644 index 0a32210..0000000 --- a/ppapi/c/dev/ppp_scrollbar_dev.h +++ /dev/null @@ -1,59 +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. - */ - -/* From dev/ppp_scrollbar_dev.idl modified Tue Nov 27 14:46:25 2012. */ - -#ifndef PPAPI_C_DEV_PPP_SCROLLBAR_DEV_H_ -#define PPAPI_C_DEV_PPP_SCROLLBAR_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" - -#define PPP_SCROLLBAR_DEV_INTERFACE_0_2 "PPP_Scrollbar(Dev);0.2" -#define PPP_SCROLLBAR_DEV_INTERFACE_0_3 "PPP_Scrollbar(Dev);0.3" -#define PPP_SCROLLBAR_DEV_INTERFACE PPP_SCROLLBAR_DEV_INTERFACE_0_3 - -/** - * @file - * This file defines the PPP_Scrollbar_Dev interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPP_Scrollbar_Dev_0_3 { - /** - * Informs the instance that the scrollbar's value has changed. - */ - void (*ValueChanged)(PP_Instance instance, - PP_Resource scrollbar, - uint32_t value); - /** - * Informs the instance that the user has changed the system - * scrollbar style. - */ - void (*OverlayChanged)(PP_Instance instance, - PP_Resource scrollbar, - PP_Bool overlay); -}; - -typedef struct PPP_Scrollbar_Dev_0_3 PPP_Scrollbar_Dev; - -struct PPP_Scrollbar_Dev_0_2 { - void (*ValueChanged)(PP_Instance instance, - PP_Resource scrollbar, - uint32_t value); -}; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPP_SCROLLBAR_DEV_H_ */ - diff --git a/ppapi/c/dev/ppp_selection_dev.h b/ppapi/c/dev/ppp_selection_dev.h deleted file mode 100644 index 15ca657..0000000 --- a/ppapi/c/dev/ppp_selection_dev.h +++ /dev/null @@ -1,45 +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. - */ - -/* From dev/ppp_selection_dev.idl modified Fri Nov 9 12:50:33 2012. */ - -#ifndef PPAPI_C_DEV_PPP_SELECTION_DEV_H_ -#define PPAPI_C_DEV_PPP_SELECTION_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" -#include "ppapi/c/pp_var.h" - -#define PPP_SELECTION_DEV_INTERFACE_0_3 "PPP_Selection(Dev);0.3" -#define PPP_SELECTION_DEV_INTERFACE PPP_SELECTION_DEV_INTERFACE_0_3 - -/** - * @file - * This file defines the PPP_Selection_Dev interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -struct PPP_Selection_Dev_0_3 { - /** - * Returns the selection, either as plain text or as html depending on "html". - * If nothing is selected, or if the given format is unavailable, return a - * void string. - */ - struct PP_Var (*GetSelectedText)(PP_Instance instance, PP_Bool html); -}; - -typedef struct PPP_Selection_Dev_0_3 PPP_Selection_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPP_SELECTION_DEV_H_ */ - diff --git a/ppapi/c/dev/ppp_widget_dev.h b/ppapi/c/dev/ppp_widget_dev.h deleted file mode 100644 index 883bc1e..0000000 --- a/ppapi/c/dev/ppp_widget_dev.h +++ /dev/null @@ -1,50 +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. - */ - -/* From dev/ppp_widget_dev.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_DEV_PPP_WIDGET_DEV_H_ -#define PPAPI_C_DEV_PPP_WIDGET_DEV_H_ - -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_point.h" -#include "ppapi/c/pp_rect.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_size.h" -#include "ppapi/c/pp_stdint.h" - -#define PPP_WIDGET_DEV_INTERFACE_0_2 "PPP_Widget(Dev);0.2" -#define PPP_WIDGET_DEV_INTERFACE PPP_WIDGET_DEV_INTERFACE_0_2 - -/** - * @file - * Implementation of the Widget interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * The interface for reusing browser widgets. - */ -struct PPP_Widget_Dev_0_2 { - /** - * Informs the instance that the given rectangle needs to be repainted. - */ - void (*Invalidate)(PP_Instance instance, - PP_Resource widget, - const struct PP_Rect* dirty_rect); -}; - -typedef struct PPP_Widget_Dev_0_2 PPP_Widget_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPP_WIDGET_DEV_H_ */ - diff --git a/ppapi/c/dev/ppp_zoom_dev.h b/ppapi/c/dev/ppp_zoom_dev.h deleted file mode 100644 index 0cc39ea..0000000 --- a/ppapi/c/dev/ppp_zoom_dev.h +++ /dev/null @@ -1,47 +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. - */ - -/* From dev/ppp_zoom_dev.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_DEV_PPP_ZOOM_DEV_H_ -#define PPAPI_C_DEV_PPP_ZOOM_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_stdint.h" - -#define PPP_ZOOM_DEV_INTERFACE_0_3 "PPP_Zoom(Dev);0.3" -#define PPP_ZOOM_DEV_INTERFACE PPP_ZOOM_DEV_INTERFACE_0_3 - -/** - * @file - * Implementation of the Zoom interface. - */ - - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * Zoom interface should only apply to those full-page "plugin-document". - */ -struct PPP_Zoom_Dev_0_3 { - /** - * Instruct plugin to zoom according to the given factor and whether the zoom - * only applies to text only. The scale factor is the percentage divided by - * 100, i.e. 150% zoom is 1.5. - */ - void (*Zoom)(PP_Instance instance, double factor, PP_Bool text_only); -}; - -typedef struct PPP_Zoom_Dev_0_3 PPP_Zoom_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPP_ZOOM_DEV_H_ */ - diff --git a/ppapi/cpp/dev/scrollbar_dev.cc b/ppapi/cpp/dev/scrollbar_dev.cc deleted file mode 100644 index 26eb9ef..0000000 --- a/ppapi/cpp/dev/scrollbar_dev.cc +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2010 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 - -#include "ppapi/cpp/dev/scrollbar_dev.h" - -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/rect.h" - -namespace pp { - -namespace { - -template <> const char* interface_name() { - return PPB_SCROLLBAR_DEV_INTERFACE; -} - -} // namespace - -Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) { -} - -Scrollbar_Dev::Scrollbar_Dev(const InstanceHandle& instance, bool vertical) { - if (!has_interface()) - return; - PassRefFromConstructor(get_interface()->Create( - instance.pp_instance(), PP_FromBool(vertical))); -} - -Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) - : Widget_Dev(other) { -} - -uint32_t Scrollbar_Dev::GetThickness() { - if (!has_interface()) - return 0; - return get_interface()->GetThickness(pp_resource()); -} - -bool Scrollbar_Dev::IsOverlay() { - if (!has_interface()) - return false; - return - PP_ToBool(get_interface()->IsOverlay(pp_resource())); -} - -uint32_t Scrollbar_Dev::GetValue() { - if (!has_interface()) - return 0; - return get_interface()->GetValue(pp_resource()); -} - -void Scrollbar_Dev::SetValue(uint32_t value) { - if (has_interface()) - get_interface()->SetValue(pp_resource(), value); -} - -void Scrollbar_Dev::SetDocumentSize(uint32_t size) { - if (has_interface()) - get_interface()->SetDocumentSize(pp_resource(), size); -} - -void Scrollbar_Dev::SetTickMarks(const Rect* tick_marks, uint32_t count) { - if (!has_interface()) - return; - - std::vector temp; - temp.resize(count); - for (uint32_t i = 0; i < count; ++i) - temp[i] = tick_marks[i]; - - get_interface()->SetTickMarks( - pp_resource(), count ? &temp[0] : NULL, count); -} - -void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { - if (has_interface()) - get_interface()->ScrollBy(pp_resource(), - unit, - multiplier); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/scrollbar_dev.h b/ppapi/cpp/dev/scrollbar_dev.h deleted file mode 100644 index fabbbd7..0000000 --- a/ppapi/cpp/dev/scrollbar_dev.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ -#define PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ - -#include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" - -namespace pp { - -class InstanceHandle; - -// This class allows a plugin to use the browser's scrollbar widget. -class Scrollbar_Dev : public Widget_Dev { - public: - // Creates an is_null() Scrollbar object. - Scrollbar_Dev() {} - - explicit Scrollbar_Dev(PP_Resource resource); - Scrollbar_Dev(const InstanceHandle& instance, bool vertical); - Scrollbar_Dev(const Scrollbar_Dev& other); - - Scrollbar_Dev& operator=(const Scrollbar_Dev& other); - - // PPB_Scrollbar methods: - uint32_t GetThickness(); - bool IsOverlay(); - uint32_t GetValue(); - void SetValue(uint32_t value); - void SetDocumentSize(uint32_t size); - void SetTickMarks(const Rect* tick_marks, uint32_t count); - void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier); -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ diff --git a/ppapi/cpp/dev/selection_dev.cc b/ppapi/cpp/dev/selection_dev.cc deleted file mode 100644 index 7e1284b..0000000 --- a/ppapi/cpp/dev/selection_dev.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2010 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/cpp/dev/selection_dev.h" - -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/var.h" - -namespace pp { - -namespace { - -static const char kPPPSelectionInterface[] = PPP_SELECTION_DEV_INTERFACE; - -PP_Var GetSelectedText(PP_Instance instance, PP_Bool html) { - void* object = - pp::Instance::GetPerInstanceObject(instance, kPPPSelectionInterface); - if (!object) - return Var().Detach(); - return static_cast(object)-> - GetSelectedText(PP_ToBool(html)).Detach(); -} - -const PPP_Selection_Dev ppp_selection = { - &GetSelectedText -}; - -} // namespace - -Selection_Dev::Selection_Dev(Instance* instance) - : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPSelectionInterface, &ppp_selection); - instance->AddPerInstanceObject(kPPPSelectionInterface, this); -} - -Selection_Dev::~Selection_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPSelectionInterface, this); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/selection_dev.h b/ppapi/cpp/dev/selection_dev.h deleted file mode 100644 index 629d361..0000000 --- a/ppapi/cpp/dev/selection_dev.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef PPAPI_CPP_DEV_SELECTION_DEV_H_ -#define PPAPI_CPP_DEV_SELECTION_DEV_H_ - -#include "ppapi/c/dev/ppp_selection_dev.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Var; - -// This class allows you to associate the PPP_Selection_Dev C-based interface -// with an object. It registers as the global handler for handling the -// PPP_Selection_Dev interface that the browser calls. -// -// You would typically use this either via inheritance on your instance: -// class MyInstance : public pp::Instance, public pp::Selection_Dev { -// class MyInstance() : pp::Selection_Dev(this) { -// } -// ... -// }; -// -// or by composition: -// class MySelection : public pp::Selection_Dev { -// ... -// }; -// -// class MyInstance : public pp::Instance { -// MyInstance() : selection_(this) { -// } -// -// MySelection selection_; -// }; -class Selection_Dev { - public: - explicit Selection_Dev(Instance* instance); - virtual ~Selection_Dev(); - - // PPP_Selection_Dev functions exposed as virtual functions for you to - // override. - virtual Var GetSelectedText(bool html) = 0; - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_SELECTION_DEV_H_ diff --git a/ppapi/cpp/dev/widget_client_dev.cc b/ppapi/cpp/dev/widget_client_dev.cc deleted file mode 100644 index 731f292..0000000 --- a/ppapi/cpp/dev/widget_client_dev.cc +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2010 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/cpp/dev/widget_client_dev.h" - -#include "ppapi/c/dev/ppp_scrollbar_dev.h" -#include "ppapi/c/dev/ppp_widget_dev.h" -#include "ppapi/cpp/dev/scrollbar_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/rect.h" - -namespace pp { - -namespace { - -// PPP_Widget_Dev -------------------------------------------------------------- - -const char kPPPWidgetInterface[] = PPP_WIDGET_DEV_INTERFACE; - -void Widget_Invalidate(PP_Instance instance, - PP_Resource widget_id, - const PP_Rect* dirty_rect) { - void* object = Instance::GetPerInstanceObject(instance, kPPPWidgetInterface); - if (!object) - return; - return static_cast(object)->InvalidateWidget( - Widget_Dev(widget_id), *dirty_rect); -} - -static PPP_Widget_Dev widget_interface = { - &Widget_Invalidate, -}; - -// PPP_Scrollbar_Dev ----------------------------------------------------------- - -const char kPPPScrollbarInterface[] = PPP_SCROLLBAR_DEV_INTERFACE; - -void Scrollbar_ValueChanged(PP_Instance instance, - PP_Resource scrollbar_id, - uint32_t value) { - void* object = - Instance::GetPerInstanceObject(instance, kPPPScrollbarInterface); - if (!object) - return; - return static_cast(object)->ScrollbarValueChanged( - Scrollbar_Dev(scrollbar_id), value); -} - -void Scrollbar_OverlayChanged(PP_Instance instance, - PP_Resource scrollbar_id, - PP_Bool overlay) { - void* object = - Instance::GetPerInstanceObject(instance, kPPPScrollbarInterface); - if (!object) - return; - return static_cast(object)->ScrollbarOverlayChanged( - Scrollbar_Dev(scrollbar_id), PP_ToBool(overlay)); -} - -static PPP_Scrollbar_Dev scrollbar_interface = { - &Scrollbar_ValueChanged, - &Scrollbar_OverlayChanged, -}; - -} // namespace - -WidgetClient_Dev::WidgetClient_Dev(Instance* instance) - : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPWidgetInterface, &widget_interface); - instance->AddPerInstanceObject(kPPPWidgetInterface, this); - Module::Get()->AddPluginInterface(kPPPScrollbarInterface, - &scrollbar_interface); - instance->AddPerInstanceObject(kPPPScrollbarInterface, this); -} - -WidgetClient_Dev::~WidgetClient_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPScrollbarInterface, this); - Instance::RemovePerInstanceObject(associated_instance_, - kPPPWidgetInterface, this); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/widget_client_dev.h b/ppapi/cpp/dev/widget_client_dev.h deleted file mode 100644 index c638cef..0000000 --- a/ppapi/cpp/dev/widget_client_dev.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ -#define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ - -#include "ppapi/c/pp_stdint.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Instance; -class Rect; -class Scrollbar_Dev; -class Widget_Dev; - -// This class provides a C++ interface for callbacks related to widgets. You -// would normally use multiple inheritance to derive from this class in your -// instance. -class WidgetClient_Dev { - public: - explicit WidgetClient_Dev(Instance* instance); - virtual ~WidgetClient_Dev(); - - /** - * Notification that the given widget should be repainted. This is the - * implementation for PPP_Widget_Dev. - */ - virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0; - - /** - * Notification that the given scrollbar should change value. This is the - * implementation for PPP_Scrollbar_Dev. - */ - virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar, - uint32_t value) = 0; - - /** - * Notification that the given scrollbar's overlay type has changed. This is - * the implementation for PPP_Scrollbar_Dev. - */ - virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar, - bool type) = 0; - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ diff --git a/ppapi/cpp/dev/widget_dev.cc b/ppapi/cpp/dev/widget_dev.cc deleted file mode 100644 index 14efe1d..0000000 --- a/ppapi/cpp/dev/widget_dev.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2010 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/cpp/dev/widget_dev.h" - -#include "ppapi/c/dev/ppb_widget_dev.h" -#include "ppapi/cpp/image_data.h" -#include "ppapi/cpp/input_event.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/rect.h" -#include "ppapi/cpp/module_impl.h" - -namespace pp { - -namespace { - -template <> const char* interface_name() { - return PPB_WIDGET_DEV_INTERFACE_0_3; -} - -template <> const char* interface_name() { - return PPB_WIDGET_DEV_INTERFACE_0_4; -} - -} // namespace - -Widget_Dev::Widget_Dev(PP_Resource resource) : Resource(resource) { -} - -Widget_Dev::Widget_Dev(const Widget_Dev& other) : Resource(other) { -} - -bool Widget_Dev::Paint(const Rect& rect, ImageData* image) { - if (has_interface()) { - return PP_ToBool(get_interface()->Paint( - pp_resource(), &rect.pp_rect(), image->pp_resource())); - } else if (has_interface()) { - return PP_ToBool(get_interface()->Paint( - pp_resource(), &rect.pp_rect(), image->pp_resource())); - } - return false; -} - -bool Widget_Dev::HandleEvent(const InputEvent& event) { - if (has_interface()) { - return PP_ToBool(get_interface()->HandleEvent( - pp_resource(), event.pp_resource())); - } else if (has_interface()) { - return PP_ToBool(get_interface()->HandleEvent( - pp_resource(), event.pp_resource())); - } - return false; -} - -bool Widget_Dev::GetLocation(Rect* location) { - if (has_interface()) { - return PP_ToBool(get_interface()->GetLocation( - pp_resource(), &location->pp_rect())); - } else if (has_interface()) { - return PP_ToBool(get_interface()->GetLocation( - pp_resource(), &location->pp_rect())); - } - return false; -} - -void Widget_Dev::SetLocation(const Rect& location) { - if (has_interface()) { - get_interface()->SetLocation(pp_resource(), - &location.pp_rect()); - } else if (has_interface()) { - get_interface()->SetLocation(pp_resource(), - &location.pp_rect()); - } -} - -void Widget_Dev::SetScale(float scale) { - if (has_interface()) - get_interface()->SetScale(pp_resource(), scale); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/widget_dev.h b/ppapi/cpp/dev/widget_dev.h deleted file mode 100644 index ef14c3c..0000000 --- a/ppapi/cpp/dev/widget_dev.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_CPP_DEV_WIDGET_DEV_H_ -#define PPAPI_CPP_DEV_WIDGET_DEV_H_ - -#include "ppapi/c/pp_stdint.h" -#include "ppapi/cpp/resource.h" - -namespace pp { - -class ImageData; -class InputEvent; -class Rect; - -// This is the base class for widget elements. As such, it can't be created -// directly. -class Widget_Dev : public Resource { - public: - // Creates an is_null() Widget object. - Widget_Dev() {} - - explicit Widget_Dev(PP_Resource resource); - Widget_Dev(const Widget_Dev& other); - - // PPB_Widget methods: - bool Paint(const Rect& rect, ImageData* image); - bool HandleEvent(const InputEvent& event); - bool GetLocation(Rect* location); - void SetLocation(const Rect& location); - void SetScale(float scale); -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_WIDGET_DEV_H_ diff --git a/ppapi/cpp/dev/zoom_dev.cc b/ppapi/cpp/dev/zoom_dev.cc deleted file mode 100644 index 0b19c09..0000000 --- a/ppapi/cpp/dev/zoom_dev.cc +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2010 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/cpp/dev/zoom_dev.h" - -#include "ppapi/c/dev/ppb_zoom_dev.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" - -namespace pp { - -namespace { - -static const char kPPPZoomInterface[] = PPP_ZOOM_DEV_INTERFACE; - -void Zoom(PP_Instance instance, - double factor, - PP_Bool text_only) { - void* object = Instance::GetPerInstanceObject(instance, kPPPZoomInterface); - if (!object) - return; - static_cast(object)->Zoom(factor, PP_ToBool(text_only)); -} - -const PPP_Zoom_Dev ppp_zoom = { - &Zoom -}; - -template <> const char* interface_name() { - return PPB_ZOOM_DEV_INTERFACE; -} - -} // namespace - -Zoom_Dev::Zoom_Dev(Instance* instance) : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPZoomInterface, &ppp_zoom); - instance->AddPerInstanceObject(kPPPZoomInterface, this); -} - -Zoom_Dev::~Zoom_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPZoomInterface, this); -} - -void Zoom_Dev::ZoomChanged(double factor) { - if (has_interface()) - get_interface()->ZoomChanged( - associated_instance_.pp_instance(), factor); -} - -void Zoom_Dev::ZoomLimitsChanged(double minimum_factor, - double maximium_factor) { - if (!has_interface()) - return; - get_interface()->ZoomLimitsChanged( - associated_instance_.pp_instance(), minimum_factor, maximium_factor); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/zoom_dev.h b/ppapi/cpp/dev/zoom_dev.h deleted file mode 100644 index b63c019..0000000 --- a/ppapi/cpp/dev/zoom_dev.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef PPAPI_CPP_DEV_ZOOM_DEV_H_ -#define PPAPI_CPP_DEV_ZOOM_DEV_H_ - -#include - -#include "ppapi/c/dev/ppp_zoom_dev.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Instance; - -// This class allows you to associate the PPP_Zoom_Dev and PPB_Zoom_Dev C-based -// interfaces with an object. It associates itself with the given instance, and -// registers as the global handler for handling the PPP_Zoom_Dev interface that -// the browser calls. -// -// You would typically use this either via inheritance on your instance: -// class MyInstance : public pp::Instance, public pp::Zoom_Dev { -// class MyInstance() : pp::Zoom_Dev(this) { -// } -// ... -// }; -// -// or by composition: -// class MyZoom : public pp::Zoom_Dev { -// ... -// }; -// -// class MyInstance : public pp::Instance { -// MyInstance() : zoom_(this) { -// } -// -// MyZoom zoom_; -// }; -class Zoom_Dev { - public: - explicit Zoom_Dev(Instance* instance); - virtual ~Zoom_Dev(); - - // PPP_Zoom_Dev functions exposed as virtual functions for you to - // override. - virtual void Zoom(double factor, bool text_only) = 0; - - // PPB_Zoom_Def functions for you to call to report new zoom factor. - void ZoomChanged(double factor); - void ZoomLimitsChanged(double minimum_factor, double maximium_factor); - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_ZOOM_DEV_H_ diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 9b73b94f..7e30452 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -17,7 +17,6 @@ #include "ppapi/c/dev/ppb_url_util_dev.h" #include "ppapi/c/dev/ppb_video_capture_dev.h" #include "ppapi/c/dev/ppb_video_decoder_dev.h" -#include "ppapi/c/dev/ppp_selection_dev.h" #include "ppapi/c/ppb_compositor.h" #include "ppapi/c/ppb_compositor_layer.h" #include "ppapi/c/ppb_console.h" @@ -164,7 +163,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_6; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_7; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoCapture_Dev_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_Dev_0_16; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Selection_Dev_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CameraDevice_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_DisplayColorProfile_Private_0_1; @@ -2766,8 +2764,6 @@ static int32_t Pnacl_M23_PPB_Printing_Dev_GetDefaultPrintSettings(PP_Resource re /* End wrapper methods for PPB_Printing_Dev_0_7 */ -/* Not generating wrapper methods for PPB_Scrollbar_Dev_0_5 */ - /* Not generating wrapper methods for PPB_TextInput_Dev_0_1 */ /* Not generating wrapper methods for PPB_TextInput_Dev_0_2 */ @@ -3003,43 +2999,16 @@ static void Pnacl_M14_PPB_VideoDecoder_Dev_Destroy(PP_Resource video_decoder) { /* Not generating wrapper methods for PPB_View_Dev_0_1 */ -/* Not generating wrapper methods for PPB_Widget_Dev_0_3 */ - -/* Not generating wrapper methods for PPB_Widget_Dev_0_4 */ - -/* Not generating wrapper methods for PPB_Zoom_Dev_0_2 */ - /* Not generating wrapper methods for PPP_NetworkState_Dev_0_1 */ /* Not generating wrapper methods for PPP_Printing_Dev_0_6 */ -/* Not generating wrapper methods for PPP_Scrollbar_Dev_0_2 */ - -/* Not generating wrapper methods for PPP_Scrollbar_Dev_0_3 */ - -/* Begin wrapper methods for PPP_Selection_Dev_0_3 */ - -static struct PP_Var Pnacl_M13_PPP_Selection_Dev_GetSelectedText(PP_Instance instance, PP_Bool html) { - const struct PPP_Selection_Dev_0_3 *iface = Pnacl_WrapperInfo_PPP_Selection_Dev_0_3.real_iface; - void (*temp_fp)(struct PP_Var* _struct_result, PP_Instance instance, PP_Bool html) = - ((void (*)(struct PP_Var* _struct_result, PP_Instance instance, PP_Bool html))iface->GetSelectedText); - struct PP_Var _struct_result; - temp_fp(&_struct_result, instance, html); - return _struct_result; -} - -/* End wrapper methods for PPP_Selection_Dev_0_3 */ - /* Not generating wrapper methods for PPP_TextInput_Dev_0_1 */ /* Not generating wrapper methods for PPP_VideoCapture_Dev_0_1 */ /* Not generating wrapper methods for PPP_VideoDecoder_Dev_0_11 */ -/* Not generating wrapper methods for PPP_Widget_Dev_0_2 */ - -/* Not generating wrapper methods for PPP_Zoom_Dev_0_3 */ - /* Not generating wrapper methods for PPB_CameraCapabilities_Private_0_1 */ /* Begin wrapper methods for PPB_CameraDevice_Private_0_1 */ @@ -5311,8 +5280,6 @@ static const struct PPB_Printing_Dev_0_7 Pnacl_Wrappers_PPB_Printing_Dev_0_7 = { .GetDefaultPrintSettings = (int32_t (*)(PP_Resource resource, struct PP_PrintSettings_Dev* print_settings, struct PP_CompletionCallback callback))&Pnacl_M23_PPB_Printing_Dev_GetDefaultPrintSettings }; -/* Not generating wrapper interface for PPB_Scrollbar_Dev_0_5 */ - /* Not generating wrapper interface for PPB_TextInput_Dev_0_1 */ /* Not generating wrapper interface for PPB_TextInput_Dev_0_2 */ @@ -5379,34 +5346,16 @@ static const struct PPB_VideoDecoder_Dev_0_16 Pnacl_Wrappers_PPB_VideoDecoder_De /* Not generating wrapper interface for PPB_View_Dev_0_1 */ -/* Not generating wrapper interface for PPB_Widget_Dev_0_3 */ - -/* Not generating wrapper interface for PPB_Widget_Dev_0_4 */ - -/* Not generating wrapper interface for PPB_Zoom_Dev_0_2 */ - /* Not generating wrapper interface for PPP_NetworkState_Dev_0_1 */ /* Not generating wrapper interface for PPP_Printing_Dev_0_6 */ -/* Not generating wrapper interface for PPP_Scrollbar_Dev_0_2 */ - -/* Not generating wrapper interface for PPP_Scrollbar_Dev_0_3 */ - -static const struct PPP_Selection_Dev_0_3 Pnacl_Wrappers_PPP_Selection_Dev_0_3 = { - .GetSelectedText = &Pnacl_M13_PPP_Selection_Dev_GetSelectedText -}; - /* Not generating wrapper interface for PPP_TextInput_Dev_0_1 */ /* Not generating wrapper interface for PPP_VideoCapture_Dev_0_1 */ /* Not generating wrapper interface for PPP_VideoDecoder_Dev_0_11 */ -/* Not generating wrapper interface for PPP_Widget_Dev_0_2 */ - -/* Not generating wrapper interface for PPP_Zoom_Dev_0_3 */ - /* Not generating wrapper interface for PPB_CameraCapabilities_Private_0_1 */ static const struct PPB_CameraDevice_Private_0_1 Pnacl_Wrappers_PPB_CameraDevice_Private_0_1 = { @@ -6240,12 +6189,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_Dev_0_16 = { .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Selection_Dev_0_3 = { - .iface_macro = PPP_SELECTION_DEV_INTERFACE_0_3, - .wrapped_iface = (const void *) &Pnacl_Wrappers_PPP_Selection_Dev_0_3, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CameraDevice_Private_0_1 = { .iface_macro = PPB_CAMERADEVICE_PRIVATE_INTERFACE_0_1, .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_CameraDevice_Private_0_1, @@ -6599,7 +6542,6 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { static struct __PnaclWrapperInfo *s_ppp_wrappers[] = { &Pnacl_WrapperInfo_PPP_Messaging_1_0, - &Pnacl_WrapperInfo_PPP_Selection_Dev_0_3, &Pnacl_WrapperInfo_PPP_ContentDecryptor_Private_0_15, &Pnacl_WrapperInfo_PPP_Instance_Private_0_1, NULL diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index 6e6f90b..9a8c4ce 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -244,8 +244,6 @@ 'thunk/ppb_platform_verification_private_thunk.cc', 'thunk/ppb_printing_api.h', 'thunk/ppb_printing_dev_thunk.cc', - 'thunk/ppb_scrollbar_api.h', - 'thunk/ppb_scrollbar_thunk.cc', 'thunk/ppb_tcp_server_socket_private_api.h', 'thunk/ppb_tcp_server_socket_private_thunk.cc', 'thunk/ppb_tcp_socket_api.h', @@ -291,11 +289,8 @@ 'thunk/ppb_view_thunk.cc', 'thunk/ppb_websocket_api.h', 'thunk/ppb_websocket_thunk.cc', - 'thunk/ppb_widget_api.h', - 'thunk/ppb_widget_dev_thunk.cc', 'thunk/ppb_x509_certificate_private_api.h', 'thunk/ppb_x509_certificate_private_thunk.cc', - 'thunk/ppb_zoom_dev_thunk.cc', 'thunk/thunk.h', ], 'defines': [ @@ -334,7 +329,6 @@ 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', 'thunk/ppb_pdf_thunk.cc', 'thunk/ppb_platform_verification_private_thunk.cc', - 'thunk/ppb_scrollbar_thunk.cc', 'thunk/ppb_transport_thunk.cc', 'thunk/ppb_url_util_thunk.cc', 'thunk/ppb_video_capture_thunk.cc', diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index add92ce..506ecd8 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -86,20 +86,13 @@ 'c/dev/ppb_ime_input_event_dev.h', 'c/dev/ppb_memory_dev.h', 'c/dev/ppb_printing_dev.h', - 'c/dev/ppb_scrollbar_dev.h', 'c/dev/ppb_text_input_dev.h', 'c/dev/ppb_truetype_font_dev.h', 'c/dev/ppb_url_util_dev.h', 'c/dev/ppb_video_decoder_dev.h', - 'c/dev/ppb_widget_dev.h', - 'c/dev/ppb_zoom_dev.h', 'c/dev/ppp_network_state_dev.h', - 'c/dev/ppp_scrollbar_dev.h', - 'c/dev/ppp_selection_dev.h', 'c/dev/ppp_text_input_dev.h', 'c/dev/ppp_video_decoder_dev.h', - 'c/dev/ppp_widget_dev.h', - 'c/dev/ppp_zoom_dev.h', # Private interfaces. 'c/private/pp_file_handle.h', @@ -275,10 +268,6 @@ 'cpp/dev/memory_dev.h', 'cpp/dev/printing_dev.cc', 'cpp/dev/printing_dev.h', - 'cpp/dev/scrollbar_dev.cc', - 'cpp/dev/scrollbar_dev.h', - 'cpp/dev/selection_dev.cc', - 'cpp/dev/selection_dev.h', 'cpp/dev/text_input_dev.cc', 'cpp/dev/text_input_dev.h', 'cpp/dev/truetype_font_dev.cc', @@ -295,12 +284,6 @@ 'cpp/dev/video_decoder_dev.h', 'cpp/dev/view_dev.cc', 'cpp/dev/view_dev.h', - 'cpp/dev/widget_client_dev.cc', - 'cpp/dev/widget_client_dev.h', - 'cpp/dev/widget_dev.cc', - 'cpp/dev/widget_dev.h', - 'cpp/dev/zoom_dev.cc', - 'cpp/dev/zoom_dev.h', # Deprecated interfaces. 'cpp/dev/scriptable_object_deprecated.cc', @@ -477,8 +460,6 @@ 'tests/test_post_message.h', 'tests/test_printing.cc', 'tests/test_printing.h', - 'tests/test_scrollbar.cc', - 'tests/test_scrollbar.h', 'tests/test_tcp_server_socket_private.cc', 'tests/test_tcp_server_socket_private.h', 'tests/test_tcp_socket.cc', diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 52b6a3d..85c7675 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -19,7 +19,6 @@ #include "ppapi/c/dev/ppb_memory_dev.h" #include "ppapi/c/dev/ppb_opengles2ext_dev.h" #include "ppapi/c/dev/ppb_printing_dev.h" -#include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -27,8 +26,6 @@ #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/dev/ppb_video_capture_dev.h" #include "ppapi/c/dev/ppb_view_dev.h" -#include "ppapi/c/dev/ppb_widget_dev.h" -#include "ppapi/c/dev/ppb_zoom_dev.h" #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_buffer.h" #include "ppapi/c/ppb_audio_config.h" diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index 6f0042d..bcbbe6f 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -485,19 +485,6 @@ void PPB_Instance_Proxy::StartTrackingLatency(PP_Instance instance) { API_ID_PPB_INSTANCE, instance)); } -void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, - double factor) { - // Not proxied yet. - NOTIMPLEMENTED(); -} - -void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, - double minimum_factor, - double maximium_factor) { - // Not proxied yet. - NOTIMPLEMENTED(); -} - PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) { ReceiveSerializedVarReturnValue result; diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index f7a7159..8d8c2b5 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -76,10 +76,6 @@ class PPB_Instance_Proxy : public InterfaceProxy, void StartTrackingLatency(PP_Instance instance) override; void ClearInputEventRequest(PP_Instance instance, uint32_t event_classes) override; - void ZoomChanged(PP_Instance instance, double factor) override; - void ZoomLimitsChanged(PP_Instance instance, - double minimum_factor, - double maximium_factor) override; void PostMessage(PP_Instance instance, PP_Var message) override; int32_t RegisterMessageHandler(PP_Instance instance, void* user_data, diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index e20eb9d..aa522ee 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -469,12 +469,6 @@ PP_Resource ResourceCreationProxy::CreatePlatformVerificationPrivate( GetReference(); } -PP_Resource ResourceCreationProxy::CreateScrollbar(PP_Instance instance, - PP_Bool vertical) { - NOTIMPLEMENTED(); // Not proxied yet. - return 0; -} - PP_Resource ResourceCreationProxy::CreateVideoCapture(PP_Instance instance) { PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); if (!dispatcher) diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index 1e6d901..4aa3d43 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h @@ -173,8 +173,6 @@ class ResourceCreationProxy : public InterfaceProxy, const PP_Flash_Menu* menu_data) override; PP_Resource CreateFlashMessageLoop(PP_Instance instance) override; PP_Resource CreatePlatformVerificationPrivate(PP_Instance instance) override; - PP_Resource CreateScrollbar(PP_Instance instance, - PP_Bool vertical) override; PP_Resource CreateVideoCapture(PP_Instance instance) override; PP_Resource CreateVideoDecoderDev( PP_Instance instance, diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index b1bc277..d2a174c 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -21,7 +21,6 @@ #include "ppapi/c/dev/ppb_ime_input_event_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" #include "ppapi/c/dev/ppb_printing_dev.h" -#include "ppapi/c/dev/ppb_scrollbar_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -29,16 +28,10 @@ #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/dev/ppb_video_decoder_dev.h" #include "ppapi/c/dev/ppb_view_dev.h" -#include "ppapi/c/dev/ppb_widget_dev.h" -#include "ppapi/c/dev/ppb_zoom_dev.h" #include "ppapi/c/dev/ppp_class_deprecated.h" #include "ppapi/c/dev/ppp_printing_dev.h" -#include "ppapi/c/dev/ppp_scrollbar_dev.h" -#include "ppapi/c/dev/ppp_selection_dev.h" #include "ppapi/c/dev/ppp_text_input_dev.h" #include "ppapi/c/dev/ppp_video_decoder_dev.h" -#include "ppapi/c/dev/ppp_widget_dev.h" -#include "ppapi/c/dev/ppp_zoom_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index 94b033d..a46a89e 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -23,15 +23,10 @@ #include "ppapi/cpp/dev/memory_dev.h" #include "ppapi/cpp/dev/printing_dev.h" #include "ppapi/cpp/dev/scriptable_object_deprecated.h" -#include "ppapi/cpp/dev/scrollbar_dev.h" -#include "ppapi/cpp/dev/selection_dev.h" #include "ppapi/cpp/dev/text_input_dev.h" #include "ppapi/cpp/dev/url_util_dev.h" #include "ppapi/cpp/dev/video_decoder_dev.h" #include "ppapi/cpp/dev/view_dev.h" -#include "ppapi/cpp/dev/widget_client_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" -#include "ppapi/cpp/dev/zoom_dev.h" #include "ppapi/cpp/directory_entry.h" #include "ppapi/cpp/file_io.h" #include "ppapi/cpp/file_ref.h" diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h index 90283bd..42470f5 100644 --- a/ppapi/tests/test_case.h +++ b/ppapi/tests/test_case.h @@ -15,7 +15,6 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_time.h" #include "ppapi/c/private/ppb_testing_private.h" -#include "ppapi/cpp/dev/scrollbar_dev.h" #include "ppapi/cpp/message_loop.h" #include "ppapi/cpp/view.h" #include "ppapi/tests/test_utils.h" diff --git a/ppapi/tests/test_scrollbar.cc b/ppapi/tests/test_scrollbar.cc deleted file mode 100644 index 521ac17..0000000 --- a/ppapi/tests/test_scrollbar.cc +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2011 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/tests/test_scrollbar.h" - -#include - -#include "ppapi/c/pp_input_event.h" -#include "ppapi/cpp/input_event.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/rect.h" -#include "ppapi/tests/testing_instance.h" - -REGISTER_TEST_CASE(Scrollbar); - -TestScrollbar::TestScrollbar(TestingInstance* instance) - : TestCase(instance), - WidgetClient_Dev(instance), - scrollbar_(instance, true), - scrollbar_value_changed_(false) { -} - -bool TestScrollbar::Init() { - return CheckTestingInterface(); -} - -void TestScrollbar::RunTests(const std::string& filter) { - RUN_TEST(HandleEvent, filter); -} - -std::string TestScrollbar::TestHandleEvent() { - pp::Rect location; - location.set_width(1000); - location.set_height(1000); - scrollbar_.SetLocation(location); - - scrollbar_.SetDocumentSize(10000); - - pp::Core* core = pp::Module::Get()->core(); - pp::KeyboardInputEvent input_event( - instance_, PP_INPUTEVENT_TYPE_KEYDOWN, - core->GetTimeTicks(), - 0, // Modifier. - 0x28, // Key code = VKEY_DOWN. - pp::Var(), - pp::Var("ArrowDown")); - scrollbar_.HandleEvent(input_event); - - return scrollbar_value_changed_ ? - "" : "Didn't get callback for scrollbar value change"; -} - -void TestScrollbar::InvalidateWidget(pp::Widget_Dev widget, - const pp::Rect& dirty_rect) { -} - -void TestScrollbar::ScrollbarValueChanged(pp::Scrollbar_Dev scrollbar, - uint32_t value) { - if (scrollbar == scrollbar_) - scrollbar_value_changed_ = true; -} - -void TestScrollbar::ScrollbarOverlayChanged(pp::Scrollbar_Dev scrollbar, - bool type) { -} diff --git a/ppapi/tests/test_scrollbar.h b/ppapi/tests/test_scrollbar.h deleted file mode 100644 index 4025fbb4..0000000 --- a/ppapi/tests/test_scrollbar.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PAPPI_TESTS_TEST_SCROLLBAR_H_ -#define PAPPI_TESTS_TEST_SCROLLBAR_H_ - -#include "ppapi/cpp/dev/scrollbar_dev.h" -#include "ppapi/cpp/dev/widget_client_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" -#include "ppapi/tests/test_case.h" - -class TestScrollbar : public TestCase, - public pp::WidgetClient_Dev { - public: - TestScrollbar(TestingInstance* instance); - - // TestCase implementation. - virtual bool Init(); - virtual void RunTests(const std::string& filter); - - private: - std::string TestHandleEvent(); - - virtual void InvalidateWidget(pp::Widget_Dev widget, - const pp::Rect& dirty_rect); - virtual void ScrollbarValueChanged(pp::Scrollbar_Dev scrollbar, - uint32_t value); - virtual void ScrollbarOverlayChanged(pp::Scrollbar_Dev scrollbar, - bool type); - - pp::Scrollbar_Dev scrollbar_; - bool scrollbar_value_changed_; -}; - -#endif // PAPPI_TESTS_TEST_SCROLLBAR_H_ diff --git a/ppapi/thunk/BUILD.gn b/ppapi/thunk/BUILD.gn index 9247bf0..0cb7110 100644 --- a/ppapi/thunk/BUILD.gn +++ b/ppapi/thunk/BUILD.gn @@ -97,7 +97,6 @@ source_set("thunk") { "ppb_platform_verification_api.h", "ppb_printing_api.h", "ppb_printing_dev_thunk.cc", - "ppb_scrollbar_api.h", "ppb_tcp_server_socket_private_api.h", "ppb_tcp_server_socket_private_thunk.cc", "ppb_tcp_socket_api.h", @@ -140,11 +139,8 @@ source_set("thunk") { "ppb_view_thunk.cc", "ppb_websocket_api.h", "ppb_websocket_thunk.cc", - "ppb_widget_api.h", - "ppb_widget_dev_thunk.cc", "ppb_x509_certificate_private_api.h", "ppb_x509_certificate_private_thunk.cc", - "ppb_zoom_dev_thunk.cc", "thunk.h", ] @@ -169,7 +165,6 @@ source_set("thunk") { "ppb_gles_chromium_texture_mapping_thunk.cc", "ppb_pdf_thunk.cc", "ppb_platform_verification_private_thunk.cc", - "ppb_scrollbar_thunk.cc", "ppb_url_util_thunk.cc", "ppb_video_capture_thunk.cc", "ppb_video_decoder_dev_thunk.cc", diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 9597843..ca28d01 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -19,7 +19,6 @@ PROXIED_IFACE(PPB_PRINTING_DEV_INTERFACE_0_7, PPB_Printing_Dev_0_7) PROXIED_IFACE(PPB_TEXTINPUT_DEV_INTERFACE_0_2, PPB_TextInput_Dev_0_2) PROXIED_IFACE(PPB_TRUETYPEFONT_DEV_INTERFACE_0_1, PPB_TrueTypeFont_Dev_0_1) PROXIED_IFACE(PPB_VIEW_DEV_INTERFACE_0_1, PPB_View_Dev_0_1) -PROXIED_IFACE(PPB_ZOOM_DEV_INTERFACE_0_2, PPB_Zoom_Dev_0_2) #if !defined(OS_NACL) PROXIED_API(PPB_Buffer) @@ -34,14 +33,11 @@ PROXIED_IFACE(PPB_DEVICEREF_DEV_INTERFACE_0_1, PPB_DeviceRef_Dev_0_1) PROXIED_IFACE(PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE_0_1, PPB_GLESChromiumTextureMapping_Dev_0_1) PROXIED_IFACE(PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_1, PPB_IMEInputEvent_Dev_0_1) -PROXIED_IFACE(PPB_SCROLLBAR_DEV_INTERFACE_0_5, PPB_Scrollbar_Dev_0_5) PROXIED_IFACE(PPB_TEXTINPUT_DEV_INTERFACE_0_1, PPB_TextInput_Dev_0_1) PROXIED_IFACE(PPB_URLUTIL_DEV_INTERFACE_0_6, PPB_URLUtil_Dev_0_6) PROXIED_IFACE(PPB_URLUTIL_DEV_INTERFACE_0_7, PPB_URLUtil_Dev_0_7) PROXIED_IFACE(PPB_VIDEOCAPTURE_DEV_INTERFACE_0_3, PPB_VideoCapture_Dev_0_3) PROXIED_IFACE(PPB_VIDEODECODER_DEV_INTERFACE_0_16, PPB_VideoDecoder_Dev_0_16) -PROXIED_IFACE(PPB_WIDGET_DEV_INTERFACE_0_3, PPB_Widget_Dev_0_3) -PROXIED_IFACE(PPB_WIDGET_DEV_INTERFACE_0_4, PPB_Widget_Dev_0_4) #endif // !defined(OS_NACL) #include "ppapi/thunk/interfaces_postamble.h" diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h index 19888c1..6778fd6 100644 --- a/ppapi/thunk/ppb_instance_api.h +++ b/ppapi/thunk/ppb_instance_api.h @@ -146,11 +146,6 @@ class PPB_Instance_API { uint32_t caret, uint32_t anchor) = 0; - // Zoom. - virtual void ZoomChanged(PP_Instance instance, double factor) = 0; - virtual void ZoomLimitsChanged(PP_Instance instance, - double minimum_factor, - double maximum_factor) = 0; // Testing and URLUtil. virtual PP_Var GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) = 0; diff --git a/ppapi/thunk/ppb_scrollbar_api.h b/ppapi/thunk/ppb_scrollbar_api.h deleted file mode 100644 index 042eec8..0000000 --- a/ppapi/thunk/ppb_scrollbar_api.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_THUNK_PPB_SCROLLBAR_API_H_ -#define PPAPI_THUNK_PPB_SCROLLBAR_API_H_ - -#include "ppapi/c/dev/ppb_scrollbar_dev.h" - -namespace ppapi { -namespace thunk { - -class PPB_Scrollbar_API { - public: - virtual ~PPB_Scrollbar_API() {} - - virtual uint32_t GetThickness() = 0; - virtual bool IsOverlay() = 0; - virtual uint32_t GetValue() = 0; - virtual void SetValue(uint32_t value) = 0; - virtual void SetDocumentSize(uint32_t size) = 0; - virtual void SetTickMarks(const PP_Rect* tick_marks, uint32_t count) = 0; - virtual void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) = 0; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_SCROLLBAR_API_H_ diff --git a/ppapi/thunk/ppb_scrollbar_thunk.cc b/ppapi/thunk/ppb_scrollbar_thunk.cc deleted file mode 100644 index 589948c..0000000 --- a/ppapi/thunk/ppb_scrollbar_thunk.cc +++ /dev/null @@ -1,95 +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/thunk/thunk.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_scrollbar_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -typedef EnterResource EnterScrollbar; - -namespace { - -PP_Resource Create(PP_Instance instance, PP_Bool vertical) { - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateScrollbar(instance, vertical); -} - -PP_Bool IsScrollbar(PP_Resource resource) { - EnterScrollbar enter(resource, false); - return PP_FromBool(enter.succeeded()); -} - -uint32_t GetThickness(PP_Resource scrollbar) { - EnterScrollbar enter(scrollbar, true); - if (enter.failed()) - return 0; - return enter.object()->GetThickness(); -} - -PP_Bool IsOverlay(PP_Resource scrollbar) { - EnterScrollbar enter(scrollbar, true); - if (enter.failed()) - return PP_FALSE; - return PP_FromBool(enter.object()->IsOverlay()); -} - -uint32_t GetValue(PP_Resource scrollbar) { - EnterScrollbar enter(scrollbar, true); - if (enter.failed()) - return 0; - return enter.object()->GetValue(); -} - -void SetValue(PP_Resource scrollbar, uint32_t value) { - EnterScrollbar enter(scrollbar, true); - if (enter.succeeded()) - enter.object()->SetValue(value); -} - -void SetDocumentSize(PP_Resource scrollbar, uint32_t size) { - EnterScrollbar enter(scrollbar, true); - if (enter.succeeded()) - enter.object()->SetDocumentSize(size); -} - -void SetTickMarks(PP_Resource scrollbar, - const PP_Rect* tick_marks, - uint32_t count) { - EnterScrollbar enter(scrollbar, true); - if (enter.succeeded()) - enter.object()->SetTickMarks(tick_marks, count); -} - -void ScrollBy(PP_Resource scrollbar, PP_ScrollBy_Dev unit, int32_t multiplier) { - EnterScrollbar enter(scrollbar, true); - if (enter.succeeded()) - enter.object()->ScrollBy(unit, multiplier); -} - -const PPB_Scrollbar_Dev g_ppb_scrollbar_thunk = { - &Create, - &IsScrollbar, - &GetThickness, - &IsOverlay, - &GetValue, - &SetValue, - &SetDocumentSize, - &SetTickMarks, - &ScrollBy -}; - -} // namespace - -const PPB_Scrollbar_Dev_0_5* GetPPB_Scrollbar_Dev_0_5_Thunk() { - return &g_ppb_scrollbar_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/ppb_video_encoder_thunk.cc b/ppapi/thunk/ppb_video_encoder_thunk.cc index 19d93b1..a53f269 100644 --- a/ppapi/thunk/ppb_video_encoder_thunk.cc +++ b/ppapi/thunk/ppb_video_encoder_thunk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// From ppb_video_encoder.idl modified Fri Apr 17 10:38:38 2015. +// From ppb_video_encoder.idl modified Mon May 18 12:43:25 2015. #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" @@ -64,12 +64,9 @@ int32_t Initialize(PP_Resource video_encoder, EnterResource enter(video_encoder, callback, true); if (enter.failed()) return enter.retval(); - return enter.SetResult(enter.object()->Initialize(input_format, - input_visible_size, - output_profile, - initial_bitrate, - acceleration, - enter.callback())); + return enter.SetResult(enter.object()->Initialize( + input_format, input_visible_size, output_profile, initial_bitrate, + acceleration, enter.callback())); } int32_t GetFramesRequired(PP_Resource video_encoder) { diff --git a/ppapi/thunk/ppb_widget_api.h b/ppapi/thunk/ppb_widget_api.h deleted file mode 100644 index 26d0221..0000000 --- a/ppapi/thunk/ppb_widget_api.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_THUNK_PPB_WIDGET_API_H_ -#define PPAPI_THUNK_PPB_WIDGET_API_H_ - -#include "ppapi/c/dev/ppb_widget_dev.h" - -namespace ppapi { -namespace thunk { - -class PPB_Widget_API { - public: - virtual ~PPB_Widget_API() {} - - virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource image_id) = 0; - virtual PP_Bool HandleEvent(PP_Resource pp_input_event) = 0; - virtual PP_Bool GetLocation(PP_Rect* location) = 0; - virtual void SetLocation(const PP_Rect* location) = 0; - virtual void SetScale(float scale) = 0; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_WIDGET_API_H_ diff --git a/ppapi/thunk/ppb_widget_dev_thunk.cc b/ppapi/thunk/ppb_widget_dev_thunk.cc deleted file mode 100644 index 4ea0d47..0000000 --- a/ppapi/thunk/ppb_widget_dev_thunk.cc +++ /dev/null @@ -1,87 +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. - -// From dev/ppb_widget_dev.idl modified Mon May 6 10:11:29 2013. - -#include "ppapi/c/dev/ppb_widget_dev.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppapi_thunk_export.h" -#include "ppapi/thunk/ppb_widget_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -PP_Bool IsWidget(PP_Resource resource) { - VLOG(4) << "PPB_Widget_Dev::IsWidget()"; - EnterResource enter(resource, false); - return PP_FromBool(enter.succeeded()); -} - -PP_Bool Paint(PP_Resource widget, - const struct PP_Rect* rect, - PP_Resource image) { - VLOG(4) << "PPB_Widget_Dev::Paint()"; - EnterResource enter(widget, false); - if (enter.failed()) - return PP_FALSE; - return enter.object()->Paint(rect, image); -} - -PP_Bool HandleEvent(PP_Resource widget, PP_Resource input_event) { - VLOG(4) << "PPB_Widget_Dev::HandleEvent()"; - EnterResource enter(widget, false); - if (enter.failed()) - return PP_FALSE; - return enter.object()->HandleEvent(input_event); -} - -PP_Bool GetLocation(PP_Resource widget, struct PP_Rect* location) { - VLOG(4) << "PPB_Widget_Dev::GetLocation()"; - EnterResource enter(widget, false); - if (enter.failed()) - return PP_FALSE; - return enter.object()->GetLocation(location); -} - -void SetLocation(PP_Resource widget, const struct PP_Rect* location) { - VLOG(4) << "PPB_Widget_Dev::SetLocation()"; - EnterResource enter(widget, false); - if (enter.failed()) - return; - enter.object()->SetLocation(location); -} - -void SetScale(PP_Resource widget, float scale) { - VLOG(4) << "PPB_Widget_Dev::SetScale()"; - EnterResource enter(widget, false); - if (enter.failed()) - return; - enter.object()->SetScale(scale); -} - -const PPB_Widget_Dev_0_3 g_ppb_widget_dev_thunk_0_3 = {&IsWidget, - &Paint, - &HandleEvent, - &GetLocation, - &SetLocation}; - -const PPB_Widget_Dev_0_4 g_ppb_widget_dev_thunk_0_4 = - {&IsWidget, &Paint, &HandleEvent, &GetLocation, &SetLocation, &SetScale}; - -} // namespace - -PPAPI_THUNK_EXPORT const PPB_Widget_Dev_0_3* GetPPB_Widget_Dev_0_3_Thunk() { - return &g_ppb_widget_dev_thunk_0_3; -} - -PPAPI_THUNK_EXPORT const PPB_Widget_Dev_0_4* GetPPB_Widget_Dev_0_4_Thunk() { - return &g_ppb_widget_dev_thunk_0_4; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/ppb_zoom_dev_thunk.cc b/ppapi/thunk/ppb_zoom_dev_thunk.cc deleted file mode 100644 index 2ff2396..0000000 --- a/ppapi/thunk/ppb_zoom_dev_thunk.cc +++ /dev/null @@ -1,47 +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. - -// From dev/ppb_zoom_dev.idl modified Tue May 7 14:43:00 2013. - -#include "ppapi/c/dev/ppb_zoom_dev.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppapi_thunk_export.h" - -namespace ppapi { -namespace thunk { - -namespace { - -void ZoomChanged(PP_Instance instance, double factor) { - VLOG(4) << "PPB_Zoom_Dev::ZoomChanged()"; - EnterInstance enter(instance); - if (enter.failed()) - return; - enter.functions()->ZoomChanged(instance, factor); -} - -void ZoomLimitsChanged(PP_Instance instance, - double minimum_factor, - double maximum_factor) { - VLOG(4) << "PPB_Zoom_Dev::ZoomLimitsChanged()"; - EnterInstance enter(instance); - if (enter.failed()) - return; - enter.functions()->ZoomLimitsChanged(instance, minimum_factor, - maximum_factor); -} - -const PPB_Zoom_Dev_0_2 g_ppb_zoom_dev_thunk_0_2 = {&ZoomChanged, - &ZoomLimitsChanged}; - -} // namespace - -PPAPI_THUNK_EXPORT const PPB_Zoom_Dev_0_2* GetPPB_Zoom_Dev_0_2_Thunk() { - return &g_ppb_zoom_dev_thunk_0_2; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index 94311bb..9a813d5 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -193,8 +193,6 @@ class ResourceCreationAPI { virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; virtual PP_Resource CreatePlatformVerificationPrivate( PP_Instance instance) = 0; - virtual PP_Resource CreateScrollbar(PP_Instance instance, - PP_Bool vertical) = 0; virtual PP_Resource CreateVideoCapture(PP_Instance instance) = 0; virtual PP_Resource CreateVideoDecoderDev( PP_Instance instance, -- cgit v1.1