summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppapi/c/ppb_view.h308
-rw-r--r--ppapi/c/ppp_instance.h378
-rw-r--r--ppapi/cpp/view.cc124
-rw-r--r--ppapi/cpp/view.h228
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_view.h82
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.cc126
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_client.cc942
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_server.cc912
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h532
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h590
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/view_data.cc32
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/view_data.h48
-rw-r--r--ppapi/shared_impl/ppb_view_shared.cc110
-rw-r--r--ppapi/shared_impl/ppb_view_shared.h122
-rw-r--r--ppapi/shared_impl/ppp_instance_combined.cc114
-rw-r--r--ppapi/thunk/ppb_view_api.h62
-rw-r--r--ppapi/thunk/ppb_view_thunk.cc192
17 files changed, 2451 insertions, 2451 deletions
diff --git a/ppapi/c/ppb_view.h b/ppapi/c/ppb_view.h
index 5592817..5c7f5db 100644
--- a/ppapi/c/ppb_view.h
+++ b/ppapi/c/ppb_view.h
@@ -1,154 +1,154 @@
-/* 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.
- */
-
-/* From ppb_view.idl modified Thu Dec 15 10:22:28 2011. */
-
-#ifndef PPAPI_C_PPB_VIEW_H_
-#define PPAPI_C_PPB_VIEW_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_VIEW_INTERFACE_1_0 "PPB_View;1.0"
-#define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_0
-
-/**
- * @file
- * Defines the <code>PPB_View</code> struct representing the state of the
- * view of an instance.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * <code>PPB_View</code> represents the state of the view of an instance.
- * You can get a View object with the <code>PPB_Instance.GetView()</code>
- * function. Additionally, all </code>PPB_ViewChanged</code> objects are also
- * <code>PPB_View</code> objects so you will receive new view information via
- * <code>PPP_Instance.DidChangeView</code>.
- */
-struct PPB_View {
- /**
- * <code>IsView()</code> determines if the given resource is a valid
- * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
- * resources derive from <code>PPB_View</code> and will return true here
- * as well.
- *
- * @return <code>PP_TRUE</code> if the given resource supports
- * <code>PPB_View</code> or <code>PP_FALSE</code> if it is an invalid
- * resource or is a resource of another type.
- */
- PP_Bool (*IsView)(PP_Resource resource);
- /**
- * <code>GetRect()</code> retrieves the rectangle of the instance
- * associated with the view changed notification relative to the upper left
- * of the browser viewport. This position changes when the page is scrolled.
- *
- * The returned rectangle may not be inside the visible portion of the
- * viewport if the instance is scrolled off the page. Therefore, the position
- * may be negative or larger than the size of the page. The size will always
- * reflect the size of the plugin were it to be scrolled entirely into view.
- *
- * In general, most plugins will not need to worry about the position of the
- * instance in the viewport, and only need to use the size.
- *
- * @param rect Output argument receiving the rectangle on success.
- *
- * @return Returns <code>PP_TRUE</code> if the resource was valid and the
- * viewport rect was filled in, <code>PP_FALSE</code> if not.
- */
- PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect);
- /**
- * <code>IsFullscreen()</code> returns whether the instance is currently
- * displaying in fullscreen mode.
- *
- * @return <code>PP_TRUE</code> if the instance is in full screen mode,
- * or <code>PP_FALSE</code> if it's not or the resource is invalid.
- */
- PP_Bool (*IsFullscreen)(PP_Resource resource);
- /**
- * <code>IsVisible()</code> returns whether the instance is plausibly
- * visible to the user. You should use this flag to throttle or stop updates
- * for invisible plugins.
- *
- * Thie measure incorporates both whether the instance is scrolled into
- * view (whether the clip rect is nonempty) and whether the page is plausibly
- * visible to the user (<code>IsPageVisible()</code>).
- *
- * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
- * user, <code>PP_FALSE</code> if it is definitely not visible.
- */
- PP_Bool (*IsVisible)(PP_Resource resource);
- /**
- * <code>IsPageVisible()</code> determines if the page that contains the
- * instance is visible. The most common cause of invisible pages is that
- * the page is in a background tab in the browser.
- *
- * Most applications should use <code>IsVisible()</code> rather than
- * this function since the instance could be scrolled off of a visible
- * page, and this function will still return true. However, depending on
- * how your plugin interacts with the page, there may be certain updates
- * that you may want to perform when the page is visible even if your
- * specific instance isn't.
- *
- * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
- * user, <code>PP_FALSE</code> if it is definitely not visible.
- */
- PP_Bool (*IsPageVisible)(PP_Resource resource);
- /**
- * <code>GetClipRect()</code> returns the clip rectangle relative to the
- * upper left corner of the instance. This rectangle indicates which parts of
- * the instance are scrolled into view.
- *
- * If the instance is scrolled off the view, the return value will be
- * (0, 0, 0, 0). this state. This clip rect does <i>not</i> take into account
- * page visibility. This means if the instance is scrolled into view but the
- * page itself is in an invisible tab, the return rect will contain the
- * visible rect assuming the page was visible. See
- * <code>IsPageVisible()</code> and <code>IsVisible()</code> if you want to
- * handle this case.
- *
- * Most applications will not need to worry about the clip. The recommended
- * behavior is to do full updates if the instance is visible as determined by
- * <code>IsVisible()</code> and do no updates if not.
- *
- * However, if the cost for computing pixels is very high for your
- * application or the pages you're targeting frequently have very large
- * instances with small visible portions, you may wish to optimize further.
- * In this case, the clip rect will tell you which parts of the plugin to
- * update.
- *
- * Note that painting of the page and sending of view changed updates
- * happens asynchronously. This means when the user scrolls, for example,
- * it is likely that the previous backing store of the instance will be used
- * for the first paint, and will be updated later when your application
- * generates new content with the new clip. This may cause flickering at the
- * boundaries when scrolling. If you do choose to do partial updates, you may
- * want to think about what color the invisible portions of your backing
- * store contain (be it transparent or some background color) or to paint
- * a certain region outside the clip to reduce the visual distraction when
- * this happens.
- *
- * @param clip Output argument receiving the clip rect on success.
- *
- * @return Returns <code>PP_TRUE</code> if the resource was valid and the
- * clip rect was filled in, <code>PP_FALSE</code> if not.
- */
- PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_PPB_VIEW_H_ */
-
+/* 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.
+ */
+
+/* From ppb_view.idl modified Thu Dec 15 10:22:28 2011. */
+
+#ifndef PPAPI_C_PPB_VIEW_H_
+#define PPAPI_C_PPB_VIEW_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_VIEW_INTERFACE_1_0 "PPB_View;1.0"
+#define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_0
+
+/**
+ * @file
+ * Defines the <code>PPB_View</code> struct representing the state of the
+ * view of an instance.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * <code>PPB_View</code> represents the state of the view of an instance.
+ * You can get a View object with the <code>PPB_Instance.GetView()</code>
+ * function. Additionally, all </code>PPB_ViewChanged</code> objects are also
+ * <code>PPB_View</code> objects so you will receive new view information via
+ * <code>PPP_Instance.DidChangeView</code>.
+ */
+struct PPB_View {
+ /**
+ * <code>IsView()</code> determines if the given resource is a valid
+ * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
+ * resources derive from <code>PPB_View</code> and will return true here
+ * as well.
+ *
+ * @return <code>PP_TRUE</code> if the given resource supports
+ * <code>PPB_View</code> or <code>PP_FALSE</code> if it is an invalid
+ * resource or is a resource of another type.
+ */
+ PP_Bool (*IsView)(PP_Resource resource);
+ /**
+ * <code>GetRect()</code> retrieves the rectangle of the instance
+ * associated with the view changed notification relative to the upper left
+ * of the browser viewport. This position changes when the page is scrolled.
+ *
+ * The returned rectangle may not be inside the visible portion of the
+ * viewport if the instance is scrolled off the page. Therefore, the position
+ * may be negative or larger than the size of the page. The size will always
+ * reflect the size of the plugin were it to be scrolled entirely into view.
+ *
+ * In general, most plugins will not need to worry about the position of the
+ * instance in the viewport, and only need to use the size.
+ *
+ * @param rect Output argument receiving the rectangle on success.
+ *
+ * @return Returns <code>PP_TRUE</code> if the resource was valid and the
+ * viewport rect was filled in, <code>PP_FALSE</code> if not.
+ */
+ PP_Bool (*GetRect)(PP_Resource resource, struct PP_Rect* rect);
+ /**
+ * <code>IsFullscreen()</code> returns whether the instance is currently
+ * displaying in fullscreen mode.
+ *
+ * @return <code>PP_TRUE</code> if the instance is in full screen mode,
+ * or <code>PP_FALSE</code> if it's not or the resource is invalid.
+ */
+ PP_Bool (*IsFullscreen)(PP_Resource resource);
+ /**
+ * <code>IsVisible()</code> returns whether the instance is plausibly
+ * visible to the user. You should use this flag to throttle or stop updates
+ * for invisible plugins.
+ *
+ * Thie measure incorporates both whether the instance is scrolled into
+ * view (whether the clip rect is nonempty) and whether the page is plausibly
+ * visible to the user (<code>IsPageVisible()</code>).
+ *
+ * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
+ * user, <code>PP_FALSE</code> if it is definitely not visible.
+ */
+ PP_Bool (*IsVisible)(PP_Resource resource);
+ /**
+ * <code>IsPageVisible()</code> determines if the page that contains the
+ * instance is visible. The most common cause of invisible pages is that
+ * the page is in a background tab in the browser.
+ *
+ * Most applications should use <code>IsVisible()</code> rather than
+ * this function since the instance could be scrolled off of a visible
+ * page, and this function will still return true. However, depending on
+ * how your plugin interacts with the page, there may be certain updates
+ * that you may want to perform when the page is visible even if your
+ * specific instance isn't.
+ *
+ * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
+ * user, <code>PP_FALSE</code> if it is definitely not visible.
+ */
+ PP_Bool (*IsPageVisible)(PP_Resource resource);
+ /**
+ * <code>GetClipRect()</code> returns the clip rectangle relative to the
+ * upper left corner of the instance. This rectangle indicates which parts of
+ * the instance are scrolled into view.
+ *
+ * If the instance is scrolled off the view, the return value will be
+ * (0, 0, 0, 0). this state. This clip rect does <i>not</i> take into account
+ * page visibility. This means if the instance is scrolled into view but the
+ * page itself is in an invisible tab, the return rect will contain the
+ * visible rect assuming the page was visible. See
+ * <code>IsPageVisible()</code> and <code>IsVisible()</code> if you want to
+ * handle this case.
+ *
+ * Most applications will not need to worry about the clip. The recommended
+ * behavior is to do full updates if the instance is visible as determined by
+ * <code>IsVisible()</code> and do no updates if not.
+ *
+ * However, if the cost for computing pixels is very high for your
+ * application or the pages you're targeting frequently have very large
+ * instances with small visible portions, you may wish to optimize further.
+ * In this case, the clip rect will tell you which parts of the plugin to
+ * update.
+ *
+ * Note that painting of the page and sending of view changed updates
+ * happens asynchronously. This means when the user scrolls, for example,
+ * it is likely that the previous backing store of the instance will be used
+ * for the first paint, and will be updated later when your application
+ * generates new content with the new clip. This may cause flickering at the
+ * boundaries when scrolling. If you do choose to do partial updates, you may
+ * want to think about what color the invisible portions of your backing
+ * store contain (be it transparent or some background color) or to paint
+ * a certain region outside the clip to reduce the visual distraction when
+ * this happens.
+ *
+ * @param clip Output argument receiving the clip rect on success.
+ *
+ * @return Returns <code>PP_TRUE</code> if the resource was valid and the
+ * clip rect was filled in, <code>PP_FALSE</code> if not.
+ */
+ PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_VIEW_H_ */
+
diff --git a/ppapi/c/ppp_instance.h b/ppapi/c/ppp_instance.h
index 0dd194c..64766e6 100644
--- a/ppapi/c/ppp_instance.h
+++ b/ppapi/c/ppp_instance.h
@@ -1,189 +1,189 @@
-/* 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.
- */
-
-/* From ppp_instance.idl modified Thu Dec 15 10:30:21 2011. */
-
-#ifndef PPAPI_C_PPP_INSTANCE_H_
-#define PPAPI_C_PPP_INSTANCE_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 PPP_INSTANCE_INTERFACE_1_0 "PPP_Instance;1.0"
-#define PPP_INSTANCE_INTERFACE_1_1 "PPP_Instance;1.1"
-#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_1_1
-
-/**
- * @file
- * This file defines the <code>PPP_Instance</code> structure - a series of
- * pointers to methods that you must implement in your module.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * The <code>PPP_Instance</code> interface contains pointers to a series of
- * functions that you must implement in your module. These functions can be
- * trivial (simply return the default return value) unless you want your module
- * to handle events such as change of focus or input events (keyboard/mouse)
- * events.
- */
-struct PPP_Instance {
- /**
- * DidCreate() is a creation handler that is called when a new instance is
- * created. This function is called for each instantiation on the page,
- * corresponding to one \<embed\> tag on the page.
- *
- * Generally you would handle this call by initializing the information
- * your module associates with an instance and creating a mapping from the
- * given <code>PP_Instance</code> handle to this data. The
- * <code>PP_Instance</code> handle will be used in subsequent calls to
- * identify which instance the call pertains to.
- *
- * It's possible for more than one instance to be created in a single module.
- * This means that you may get more than one <code>OnCreate</code> without an
- * <code>OnDestroy</code> in between, and should be prepared to maintain
- * multiple states associated with each instance.
- *
- * If this function reports a failure (by returning <code>PP_FALSE</code>),
- * the instance will be deleted.
- *
- * @param[in] instance A new <code>PP_Instance</code> identifying one
- * instance of a module. This is an opaque handle.
- *
- * @param[in] argc The number of arguments contained in <code>argn</code>
- * and <code>argv</code>.
- *
- * @param[in] argn An array of argument names. These argument names are
- * supplied in the \<embed\> tag, for example:
- * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
- * argument names: "id" and "dimensions."
- *
- * @param[in] argv An array of argument values. These are the values of the
- * arguments listed in the \<embed\> tag, for example
- * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
- * argument values: "nacl_module" and "2". The indices of these values match
- * the indices of the corresponding names in <code>argn</code>.
- *
- * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
- * failure.
- */
- PP_Bool (*DidCreate)(PP_Instance instance,
- uint32_t argc,
- const char* argn[],
- const char* argv[]);
- /**
- * DidDestroy() is an instance destruction handler. This function is called
- * in many cases (see below) when a module instance is destroyed. It will be
- * called even if DidCreate() returned failure.
- *
- * Generally you will handle this call by deallocating the tracking
- * information and the <code>PP_Instance</code> mapping you created in the
- * DidCreate() call. You can also free resources associated with this
- * instance but this isn't required; all resources associated with the deleted
- * instance will be automatically freed when this function returns.
- *
- * The instance identifier will still be valid during this call, so the module
- * can perform cleanup-related tasks. Once this function returns, the
- * <code>PP_Instance</code> handle will be invalid. This means that you can't
- * do any asynchronous operations like network requests, file writes or
- * messaging from this function since they will be immediately canceled.
- *
- * <strong>Note:</strong> This function will always be skipped on untrusted
- * (Native Client) implementations. This function may be skipped on trusted
- * implementations in certain circumstances when Chrome does "fast shutdown"
- * of a web page. Fast shutdown will happen in some cases when all module
- * instances are being deleted, and no cleanup functions will be called.
- * The module will just be unloaded and the process terminated.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying one instance
- * of a module.
- */
- void (*DidDestroy)(PP_Instance instance);
- /**
- * <code>DidChangeView() is called when the position, size, or other view
- * attributes of the instance has changed.
- */
- void (*DidChangeView)(PP_Instance instance, PP_Resource view_resource);
- /**
- * DidChangeFocus() is called when an instance has gained or lost focus.
- * Having focus means that keyboard events will be sent to the instance.
- * An instance's default condition is that it will not have focus.
- *
- * <strong>Note:</strong>Clicks on instances will give focus only if you
- * handle the click event. Return <code>true</code> from
- * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use
- * unfiltered events) to signal that the click event was handled. Otherwise,
- * the browser will bubble the event and give focus to the element on the page
- * that actually did end up consuming it. If you're not getting focus, check
- * to make sure you're returning true from the mouse click in
- * <code>HandleInputEvent</code>.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying the instance
- * receiving the input event.
- *
- * @param[in] has_focus Indicates the new focused state of the instance.
- */
- void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
- /**
- * HandleDocumentLoad() is called after initialize for a full-frame
- * module that was instantiated based on the MIME type of a DOMWindow
- * navigation. This situation only applies to modules that are pre-registered
- * to handle certain MIME types. If you haven't specifically registered to
- * handle a MIME type or aren't positive this applies to you, your
- * implementation of this function can just return <code>PP_FALSE</code>.
- *
- * The given <code>url_loader</code> corresponds to a
- * <code>PPB_URLLoader</code> instance that is already opened. Its response
- * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>.
- * The reference count for the URL loader is not incremented automatically on
- * behalf of the module. You need to increment the reference count yourself
- * if you are going to keep a reference to it.
- *
- * This method returns <code>PP_FALSE</code> if the module cannot handle the
- * data. In response to this method, the module should call
- * ReadResponseBody() to read the incoming data.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying the instance
- * that should do the load.
- *
- * @param[in] url_loader An open <code>PPB_URLLoader</code> instance.
- *
- * @return <code>PP_TRUE</code> if the data was handled,
- * <code>PP_FALSE</code> otherwise.
- */
- PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
-};
-
-struct PPP_Instance_1_0 {
- PP_Bool (*DidCreate)(PP_Instance instance,
- uint32_t argc,
- const char* argn[],
- const char* argv[]);
- void (*DidDestroy)(PP_Instance instance);
- void (*DidChangeView)(PP_Instance instance,
- const struct PP_Rect* position,
- const struct PP_Rect* clip);
- void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
- PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
-};
-/**
- * @}
- */
-
-
-typedef struct PPP_Instance PPP_Instance_1_1;
-
-#endif /* PPAPI_C_PPP_INSTANCE_H_ */
-
+/* 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.
+ */
+
+/* From ppp_instance.idl modified Thu Dec 15 10:30:21 2011. */
+
+#ifndef PPAPI_C_PPP_INSTANCE_H_
+#define PPAPI_C_PPP_INSTANCE_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 PPP_INSTANCE_INTERFACE_1_0 "PPP_Instance;1.0"
+#define PPP_INSTANCE_INTERFACE_1_1 "PPP_Instance;1.1"
+#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_1_1
+
+/**
+ * @file
+ * This file defines the <code>PPP_Instance</code> structure - a series of
+ * pointers to methods that you must implement in your module.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The <code>PPP_Instance</code> interface contains pointers to a series of
+ * functions that you must implement in your module. These functions can be
+ * trivial (simply return the default return value) unless you want your module
+ * to handle events such as change of focus or input events (keyboard/mouse)
+ * events.
+ */
+struct PPP_Instance {
+ /**
+ * DidCreate() is a creation handler that is called when a new instance is
+ * created. This function is called for each instantiation on the page,
+ * corresponding to one \<embed\> tag on the page.
+ *
+ * Generally you would handle this call by initializing the information
+ * your module associates with an instance and creating a mapping from the
+ * given <code>PP_Instance</code> handle to this data. The
+ * <code>PP_Instance</code> handle will be used in subsequent calls to
+ * identify which instance the call pertains to.
+ *
+ * It's possible for more than one instance to be created in a single module.
+ * This means that you may get more than one <code>OnCreate</code> without an
+ * <code>OnDestroy</code> in between, and should be prepared to maintain
+ * multiple states associated with each instance.
+ *
+ * If this function reports a failure (by returning <code>PP_FALSE</code>),
+ * the instance will be deleted.
+ *
+ * @param[in] instance A new <code>PP_Instance</code> identifying one
+ * instance of a module. This is an opaque handle.
+ *
+ * @param[in] argc The number of arguments contained in <code>argn</code>
+ * and <code>argv</code>.
+ *
+ * @param[in] argn An array of argument names. These argument names are
+ * supplied in the \<embed\> tag, for example:
+ * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
+ * argument names: "id" and "dimensions."
+ *
+ * @param[in] argv An array of argument values. These are the values of the
+ * arguments listed in the \<embed\> tag, for example
+ * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
+ * argument values: "nacl_module" and "2". The indices of these values match
+ * the indices of the corresponding names in <code>argn</code>.
+ *
+ * @return <code>PP_TRUE</code> on success or <code>PP_FALSE</code> on
+ * failure.
+ */
+ PP_Bool (*DidCreate)(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]);
+ /**
+ * DidDestroy() is an instance destruction handler. This function is called
+ * in many cases (see below) when a module instance is destroyed. It will be
+ * called even if DidCreate() returned failure.
+ *
+ * Generally you will handle this call by deallocating the tracking
+ * information and the <code>PP_Instance</code> mapping you created in the
+ * DidCreate() call. You can also free resources associated with this
+ * instance but this isn't required; all resources associated with the deleted
+ * instance will be automatically freed when this function returns.
+ *
+ * The instance identifier will still be valid during this call, so the module
+ * can perform cleanup-related tasks. Once this function returns, the
+ * <code>PP_Instance</code> handle will be invalid. This means that you can't
+ * do any asynchronous operations like network requests, file writes or
+ * messaging from this function since they will be immediately canceled.
+ *
+ * <strong>Note:</strong> This function will always be skipped on untrusted
+ * (Native Client) implementations. This function may be skipped on trusted
+ * implementations in certain circumstances when Chrome does "fast shutdown"
+ * of a web page. Fast shutdown will happen in some cases when all module
+ * instances are being deleted, and no cleanup functions will be called.
+ * The module will just be unloaded and the process terminated.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance
+ * of a module.
+ */
+ void (*DidDestroy)(PP_Instance instance);
+ /**
+ * <code>DidChangeView() is called when the position, size, or other view
+ * attributes of the instance has changed.
+ */
+ void (*DidChangeView)(PP_Instance instance, PP_Resource view_resource);
+ /**
+ * DidChangeFocus() is called when an instance has gained or lost focus.
+ * Having focus means that keyboard events will be sent to the instance.
+ * An instance's default condition is that it will not have focus.
+ *
+ * <strong>Note:</strong>Clicks on instances will give focus only if you
+ * handle the click event. Return <code>true</code> from
+ * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use
+ * unfiltered events) to signal that the click event was handled. Otherwise,
+ * the browser will bubble the event and give focus to the element on the page
+ * that actually did end up consuming it. If you're not getting focus, check
+ * to make sure you're returning true from the mouse click in
+ * <code>HandleInputEvent</code>.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance
+ * receiving the input event.
+ *
+ * @param[in] has_focus Indicates the new focused state of the instance.
+ */
+ void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
+ /**
+ * HandleDocumentLoad() is called after initialize for a full-frame
+ * module that was instantiated based on the MIME type of a DOMWindow
+ * navigation. This situation only applies to modules that are pre-registered
+ * to handle certain MIME types. If you haven't specifically registered to
+ * handle a MIME type or aren't positive this applies to you, your
+ * implementation of this function can just return <code>PP_FALSE</code>.
+ *
+ * The given <code>url_loader</code> corresponds to a
+ * <code>PPB_URLLoader</code> instance that is already opened. Its response
+ * headers may be queried using <code>PPB_URLLoader::GetResponseInfo</code>.
+ * The reference count for the URL loader is not incremented automatically on
+ * behalf of the module. You need to increment the reference count yourself
+ * if you are going to keep a reference to it.
+ *
+ * This method returns <code>PP_FALSE</code> if the module cannot handle the
+ * data. In response to this method, the module should call
+ * ReadResponseBody() to read the incoming data.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying the instance
+ * that should do the load.
+ *
+ * @param[in] url_loader An open <code>PPB_URLLoader</code> instance.
+ *
+ * @return <code>PP_TRUE</code> if the data was handled,
+ * <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
+};
+
+struct PPP_Instance_1_0 {
+ PP_Bool (*DidCreate)(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]);
+ void (*DidDestroy)(PP_Instance instance);
+ void (*DidChangeView)(PP_Instance instance,
+ const struct PP_Rect* position,
+ const struct PP_Rect* clip);
+ void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
+ PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
+};
+/**
+ * @}
+ */
+
+
+typedef struct PPP_Instance PPP_Instance_1_1;
+
+#endif /* PPAPI_C_PPP_INSTANCE_H_ */
+
diff --git a/ppapi/cpp/view.cc b/ppapi/cpp/view.cc
index f81bc1a..6a4e353 100644
--- a/ppapi/cpp/view.cc
+++ b/ppapi/cpp/view.cc
@@ -1,62 +1,62 @@
-// 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/cpp/view.h"
-
-#include "ppapi/c/ppb_view.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_View>() {
- return PPB_VIEW_INTERFACE;
-}
-
-} // namespace
-
-View::View() : Resource() {
-}
-
-View::View(PP_Resource view_resource) : Resource(view_resource) {
-}
-
-Rect View::GetRect() const {
- if (!has_interface<PPB_View>())
- return Rect();
- PP_Rect out;
- if (PP_ToBool(get_interface<PPB_View>()->GetRect(pp_resource(), &out)))
- return Rect(out);
- return Rect();
-}
-
-bool View::IsFullscreen() const {
- if (!has_interface<PPB_View>())
- return false;
- return PP_ToBool(get_interface<PPB_View>()->IsFullscreen(pp_resource()));
-}
-
-bool View::IsVisible() const {
- if (!has_interface<PPB_View>())
- return false;
- return PP_ToBool(get_interface<PPB_View>()->IsVisible(pp_resource()));
-}
-
-bool View::IsPageVisible() const {
- if (!has_interface<PPB_View>())
- return true;
- return PP_ToBool(get_interface<PPB_View>()->IsPageVisible(pp_resource()));
-}
-
-Rect View::GetClipRect() const {
- if (!has_interface<PPB_View>())
- return Rect();
- PP_Rect out;
- if (PP_ToBool(get_interface<PPB_View>()->GetClipRect(pp_resource(), &out)))
- return Rect(out);
- return Rect();
-}
-
-} // namespace pp
+// 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/cpp/view.h"
+
+#include "ppapi/c/ppb_view.h"
+#include "ppapi/cpp/module_impl.h"
+
+namespace pp {
+
+namespace {
+
+template <> const char* interface_name<PPB_View>() {
+ return PPB_VIEW_INTERFACE;
+}
+
+} // namespace
+
+View::View() : Resource() {
+}
+
+View::View(PP_Resource view_resource) : Resource(view_resource) {
+}
+
+Rect View::GetRect() const {
+ if (!has_interface<PPB_View>())
+ return Rect();
+ PP_Rect out;
+ if (PP_ToBool(get_interface<PPB_View>()->GetRect(pp_resource(), &out)))
+ return Rect(out);
+ return Rect();
+}
+
+bool View::IsFullscreen() const {
+ if (!has_interface<PPB_View>())
+ return false;
+ return PP_ToBool(get_interface<PPB_View>()->IsFullscreen(pp_resource()));
+}
+
+bool View::IsVisible() const {
+ if (!has_interface<PPB_View>())
+ return false;
+ return PP_ToBool(get_interface<PPB_View>()->IsVisible(pp_resource()));
+}
+
+bool View::IsPageVisible() const {
+ if (!has_interface<PPB_View>())
+ return true;
+ return PP_ToBool(get_interface<PPB_View>()->IsPageVisible(pp_resource()));
+}
+
+Rect View::GetClipRect() const {
+ if (!has_interface<PPB_View>())
+ return Rect();
+ PP_Rect out;
+ if (PP_ToBool(get_interface<PPB_View>()->GetClipRect(pp_resource(), &out)))
+ return Rect(out);
+ return Rect();
+}
+
+} // namespace pp
diff --git a/ppapi/cpp/view.h b/ppapi/cpp/view.h
index ee925b0..fc363dc 100644
--- a/ppapi/cpp/view.h
+++ b/ppapi/cpp/view.h
@@ -1,114 +1,114 @@
-// 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_VIEW_H_
-#define PPAPI_CPP_VIEW_H_
-
-#include "ppapi/cpp/resource.h"
-#include "ppapi/cpp/rect.h"
-#include "ppapi/cpp/size.h"
-
-namespace pp {
-
-class View : public Resource {
- public:
- /// Default constructor for creating an is_null() <code>View</code> object.
- View();
-
- /// Creates a View resource, taking and holding an additional reference to
- /// the given resource handle.
- View(PP_Resource view_resource);
-
- /// <code>GetRect()</code> returns the rectangle of the instance
- /// associated with the view changed notification relative to the upper left
- /// of the browser viewport. This position changes when the page is scrolled.
- ///
- /// The returned rectangle may not be inside the visible portion of the
- /// viewport if the instance is scrolled off the page. Therefore, the
- /// position may be negative or larger than the size of the page. The size
- /// will always reflect the size of the plugin were it to be scrolled
- /// entirely into view.
- ///
- /// In general, most plugins will not need to worry about the position of the
- /// instance in the viewport, and only need to use the size.
- ///
- /// @return The rectangle of the instance. The default return value for
- /// an invalid View is the empty rectangle.
- Rect GetRect() const;
-
- /// <code>IsFullscreen()</code> returns whether the instance is currently
- /// displaying in fullscreen mode.
- ///
- /// @return <code>true</code> if the instance is in full screen mode,
- /// or <code>false</code> if it's not or the resource is invalid.
- bool IsFullscreen() const;
-
- /// <code>IsVisible()</code> returns true if the instance is plausibly
- /// visible to the user. You should use this flag to throttle or stop updates
- /// for invisible plugins.
- ///
- /// Thie measure incorporates both whether the instance is scrolled into
- /// view (whether the clip rect is nonempty) and whether the page is
- /// plausibly visible to the user (<code>IsPageVisible()</code>).
- ///
- /// @return <code>true</code> if the instance is plausibly visible to the
- /// user, <code>false</code> if it is definitely not visible.
- bool IsVisible() const;
-
- /// <code>IsPageVisible()</code> determines if the page that contains the
- /// instance is visible. The most common cause of invisible pages is that
- /// the page is in a background tab in the browser.
- ///
- /// Most applications should use <code>IsVisible()</code> rather than
- /// this function since the instance could be scrolled off of a visible
- /// page, and this function will still return true. However, depending on
- /// how your plugin interacts with the page, there may be certain updates
- /// that you may want to perform when the page is visible even if your
- /// specific instance isn't.
- ///
- /// @return <code>true</code> if the instance is plausibly visible to the
- /// user, <code>false</code> if it is definitely not visible.
- bool IsPageVisible() const;
-
- /// <code>GetClip()</code> returns the clip rectangle relative to the upper
- /// left corner of the instance. This rectangle indicates which parts of the
- /// instance are scrolled into view.
- ///
- /// If the instance is scrolled off the view, the return value will be
- /// (0, 0, 0, 0). this state. This clip rect does <i>not</i> take into account
- /// page visibility. This means if the instance is scrolled into view but the
- /// page itself is in an invisible tab, the return rect will contain the
- /// visible rect assuming the page was visible. See
- /// <code>IsPageVisible()</code> and <code>IsVisible()</code> if you want
- /// to handle this case.
- ///
- /// Most applications will not need to worry about the clip. The recommended
- /// behavior is to do full updates if the instance is visible as determined by
- /// <code>IsUserVisible()</code> and do no updates if not.
- ///
- /// However, if the cost for computing pixels is very high for your
- /// application or the pages you're targeting frequently have very large
- /// instances with only portions visible, you may wish to optimize further.
- /// In this case, the clip rect will tell you which parts of the plugin to
- /// update.
- ///
- /// Note that painting of the page and sending of view changed updates
- /// happens asynchronously. This means when the user scrolls, for example,
- /// it is likely that the previous backing store of the instance will be used
- /// for the first paint, and will be updated later when your application
- /// generates new content. This may cause flickering at the boundaries when
- /// scrolling. If you do choose to do partial updates, you may want to think
- /// about what color the invisible portions of your backing store contain
- /// (be it transparent or some background color) or to paint a certain
- /// region outside the clip to reduce the visual distraction when this
- /// happens.
- ///
- /// @return The rectangle representing the visible part of the instance.
- /// If the resource is invalid, the empty rect is returned.
- Rect GetClipRect() const;
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_VIEW_H_
+// 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_VIEW_H_
+#define PPAPI_CPP_VIEW_H_
+
+#include "ppapi/cpp/resource.h"
+#include "ppapi/cpp/rect.h"
+#include "ppapi/cpp/size.h"
+
+namespace pp {
+
+class View : public Resource {
+ public:
+ /// Default constructor for creating an is_null() <code>View</code> object.
+ View();
+
+ /// Creates a View resource, taking and holding an additional reference to
+ /// the given resource handle.
+ View(PP_Resource view_resource);
+
+ /// <code>GetRect()</code> returns the rectangle of the instance
+ /// associated with the view changed notification relative to the upper left
+ /// of the browser viewport. This position changes when the page is scrolled.
+ ///
+ /// The returned rectangle may not be inside the visible portion of the
+ /// viewport if the instance is scrolled off the page. Therefore, the
+ /// position may be negative or larger than the size of the page. The size
+ /// will always reflect the size of the plugin were it to be scrolled
+ /// entirely into view.
+ ///
+ /// In general, most plugins will not need to worry about the position of the
+ /// instance in the viewport, and only need to use the size.
+ ///
+ /// @return The rectangle of the instance. The default return value for
+ /// an invalid View is the empty rectangle.
+ Rect GetRect() const;
+
+ /// <code>IsFullscreen()</code> returns whether the instance is currently
+ /// displaying in fullscreen mode.
+ ///
+ /// @return <code>true</code> if the instance is in full screen mode,
+ /// or <code>false</code> if it's not or the resource is invalid.
+ bool IsFullscreen() const;
+
+ /// <code>IsVisible()</code> returns true if the instance is plausibly
+ /// visible to the user. You should use this flag to throttle or stop updates
+ /// for invisible plugins.
+ ///
+ /// Thie measure incorporates both whether the instance is scrolled into
+ /// view (whether the clip rect is nonempty) and whether the page is
+ /// plausibly visible to the user (<code>IsPageVisible()</code>).
+ ///
+ /// @return <code>true</code> if the instance is plausibly visible to the
+ /// user, <code>false</code> if it is definitely not visible.
+ bool IsVisible() const;
+
+ /// <code>IsPageVisible()</code> determines if the page that contains the
+ /// instance is visible. The most common cause of invisible pages is that
+ /// the page is in a background tab in the browser.
+ ///
+ /// Most applications should use <code>IsVisible()</code> rather than
+ /// this function since the instance could be scrolled off of a visible
+ /// page, and this function will still return true. However, depending on
+ /// how your plugin interacts with the page, there may be certain updates
+ /// that you may want to perform when the page is visible even if your
+ /// specific instance isn't.
+ ///
+ /// @return <code>true</code> if the instance is plausibly visible to the
+ /// user, <code>false</code> if it is definitely not visible.
+ bool IsPageVisible() const;
+
+ /// <code>GetClip()</code> returns the clip rectangle relative to the upper
+ /// left corner of the instance. This rectangle indicates which parts of the
+ /// instance are scrolled into view.
+ ///
+ /// If the instance is scrolled off the view, the return value will be
+ /// (0, 0, 0, 0). this state. This clip rect does <i>not</i> take into account
+ /// page visibility. This means if the instance is scrolled into view but the
+ /// page itself is in an invisible tab, the return rect will contain the
+ /// visible rect assuming the page was visible. See
+ /// <code>IsPageVisible()</code> and <code>IsVisible()</code> if you want
+ /// to handle this case.
+ ///
+ /// Most applications will not need to worry about the clip. The recommended
+ /// behavior is to do full updates if the instance is visible as determined by
+ /// <code>IsUserVisible()</code> and do no updates if not.
+ ///
+ /// However, if the cost for computing pixels is very high for your
+ /// application or the pages you're targeting frequently have very large
+ /// instances with only portions visible, you may wish to optimize further.
+ /// In this case, the clip rect will tell you which parts of the plugin to
+ /// update.
+ ///
+ /// Note that painting of the page and sending of view changed updates
+ /// happens asynchronously. This means when the user scrolls, for example,
+ /// it is likely that the previous backing store of the instance will be used
+ /// for the first paint, and will be updated later when your application
+ /// generates new content. This may cause flickering at the boundaries when
+ /// scrolling. If you do choose to do partial updates, you may want to think
+ /// about what color the invisible portions of your backing store contain
+ /// (be it transparent or some background color) or to paint a certain
+ /// region outside the clip to reduce the visual distraction when this
+ /// happens.
+ ///
+ /// @return The rectangle representing the visible part of the instance.
+ /// If the resource is invalid, the empty rect is returned.
+ Rect GetClipRect() const;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_VIEW_H_
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_view.h b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_view.h
index 6c0bfd4..99c5077 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_view.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_view.h
@@ -1,41 +1,41 @@
-// 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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
-#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
-
-#include "native_client/src/include/nacl_macros.h"
-#include "native_client/src/shared/ppapi_proxy/view_data.h"
-#include "native_client/src/shared/ppapi_proxy/plugin_resource.h"
-#include "ppapi/c/ppb_view.h"
-
-namespace ppapi_proxy {
-
-// Implements the untrusted side of the PPB_View interface.
-class PluginView : public PluginResource {
- public:
- PluginView();
- void Init(const ViewData& view_data);
- virtual ~PluginView();
-
- // PluginResource implementation.
- virtual bool InitFromBrowserResource(PP_Resource /*resource*/) {
- return true;
- }
-
- const ViewData& view_data() const { return view_data_; }
-
- static const PPB_View* GetInterface();
-
- private:
- IMPLEMENT_RESOURCE(PluginView);
- NACL_DISALLOW_COPY_AND_ASSIGN(PluginView);
-
- ViewData view_data_;
-};
-
-} // namespace ppapi_proxy
-
-#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
-
+// 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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
+#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
+
+#include "native_client/src/include/nacl_macros.h"
+#include "native_client/src/shared/ppapi_proxy/view_data.h"
+#include "native_client/src/shared/ppapi_proxy/plugin_resource.h"
+#include "ppapi/c/ppb_view.h"
+
+namespace ppapi_proxy {
+
+// Implements the untrusted side of the PPB_View interface.
+class PluginView : public PluginResource {
+ public:
+ PluginView();
+ void Init(const ViewData& view_data);
+ virtual ~PluginView();
+
+ // PluginResource implementation.
+ virtual bool InitFromBrowserResource(PP_Resource /*resource*/) {
+ return true;
+ }
+
+ const ViewData& view_data() const { return view_data_; }
+
+ static const PPB_View* GetInterface();
+
+ private:
+ IMPLEMENT_RESOURCE(PluginView);
+ NACL_DISALLOW_COPY_AND_ASSIGN(PluginView);
+
+ ViewData view_data_;
+};
+
+} // namespace ppapi_proxy
+
+#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.cc b/ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.cc
index 9da2950..b3af590 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.cc
@@ -1,63 +1,63 @@
-// 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/native_client/src/shared/ppapi_proxy/ppp_instance_combined.h"
-
-#include <stdlib.h>
-
-namespace ppapi_proxy {
-
-PPP_Instance_Combined::PPP_Instance_Combined()
- : initialized_(false),
- did_change_view_1_0_(NULL) {
-}
-
-void PPP_Instance_Combined::Init1_0(const PPP_Instance_1_0* instance_if) {
- initialized_ = true;
- did_change_view_1_0_ = instance_if->DidChangeView;
- instance_1_1_.DidCreate = instance_if->DidCreate;
- instance_1_1_.DidDestroy = instance_if->DidDestroy;
- instance_1_1_.DidChangeView = NULL;
- instance_1_1_.DidChangeFocus = instance_if->DidChangeFocus;
- instance_1_1_.HandleDocumentLoad = instance_if->HandleDocumentLoad;
-}
-
-void PPP_Instance_Combined::Init1_1(const PPP_Instance_1_1* instance_if) {
- initialized_ = true;
- instance_1_1_ = *instance_if;
-}
-
-PP_Bool PPP_Instance_Combined::DidCreate(PP_Instance instance,
- uint32_t argc,
- const char* argn[],
- const char* argv[]) {
- return instance_1_1_.DidCreate(instance, argc, argn, argv);
-}
-
-void PPP_Instance_Combined::DidDestroy(PP_Instance instance) {
- return instance_1_1_.DidDestroy(instance);
-}
-
-void PPP_Instance_Combined::DidChangeView(PP_Instance instance,
- PP_Resource view_resource,
- const struct PP_Rect* position,
- const struct PP_Rect* clip) {
- if (instance_1_1_.DidChangeView)
- instance_1_1_.DidChangeView(instance, view_resource);
- else
- did_change_view_1_0_(instance, position, clip);
-}
-
-void PPP_Instance_Combined::DidChangeFocus(PP_Instance instance,
- PP_Bool has_focus) {
- instance_1_1_.DidChangeFocus(instance, has_focus);
-}
-
-PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance,
- PP_Resource url_loader) {
- return instance_1_1_.HandleDocumentLoad(instance, url_loader);
-}
-
-} // namespace ppapi_proxy
-
+// 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/native_client/src/shared/ppapi_proxy/ppp_instance_combined.h"
+
+#include <stdlib.h>
+
+namespace ppapi_proxy {
+
+PPP_Instance_Combined::PPP_Instance_Combined()
+ : initialized_(false),
+ did_change_view_1_0_(NULL) {
+}
+
+void PPP_Instance_Combined::Init1_0(const PPP_Instance_1_0* instance_if) {
+ initialized_ = true;
+ did_change_view_1_0_ = instance_if->DidChangeView;
+ instance_1_1_.DidCreate = instance_if->DidCreate;
+ instance_1_1_.DidDestroy = instance_if->DidDestroy;
+ instance_1_1_.DidChangeView = NULL;
+ instance_1_1_.DidChangeFocus = instance_if->DidChangeFocus;
+ instance_1_1_.HandleDocumentLoad = instance_if->HandleDocumentLoad;
+}
+
+void PPP_Instance_Combined::Init1_1(const PPP_Instance_1_1* instance_if) {
+ initialized_ = true;
+ instance_1_1_ = *instance_if;
+}
+
+PP_Bool PPP_Instance_Combined::DidCreate(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]) {
+ return instance_1_1_.DidCreate(instance, argc, argn, argv);
+}
+
+void PPP_Instance_Combined::DidDestroy(PP_Instance instance) {
+ return instance_1_1_.DidDestroy(instance);
+}
+
+void PPP_Instance_Combined::DidChangeView(PP_Instance instance,
+ PP_Resource view_resource,
+ const struct PP_Rect* position,
+ const struct PP_Rect* clip) {
+ if (instance_1_1_.DidChangeView)
+ instance_1_1_.DidChangeView(instance, view_resource);
+ else
+ did_change_view_1_0_(instance, position, clip);
+}
+
+void PPP_Instance_Combined::DidChangeFocus(PP_Instance instance,
+ PP_Bool has_focus) {
+ instance_1_1_.DidChangeFocus(instance, has_focus);
+}
+
+PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance,
+ PP_Resource url_loader) {
+ return instance_1_1_.HandleDocumentLoad(instance, url_loader);
+}
+
+} // namespace ppapi_proxy
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_client.cc b/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_client.cc
index 2ff6444..27dc2e1 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_client.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_client.cc
@@ -1,471 +1,471 @@
-// 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.
-//
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-//
-// Automatically generated code. See srpcgen.py
-//
-// NaCl Simple Remote Procedure Call interface abstractions.
-
-#include "trusted/srpcgen/ppp_rpc.h"
-#ifdef __native_client__
-#ifndef UNREFERENCED_PARAMETER
-#define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
-#endif // UNREFERENCED_PARAMETER
-#else
-#include "native_client/src/include/portability.h"
-#endif // __native_client__
-#include "native_client/src/shared/ppapi_proxy/browser_globals.h"
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
-#include "ppapi/c/pp_resource.h"
-
-NaClSrpcError CompletionCallbackRpcClient::RunCompletionCallback(
- NaClSrpcChannel* channel,
- int32_t callback_id,
- int32_t result,
- nacl_abi_size_t read_buffer_bytes, char* read_buffer) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "RunCompletionCallback:iiC:",
- callback_id,
- result,
- read_buffer_bytes, read_buffer
- );
- return retval;
-}
-
-NaClSrpcError PppRpcClient::PPP_InitializeModule(
- NaClSrpcChannel* channel,
- int32_t pid,
- PP_Module module,
- NaClSrpcImcDescType upcall_channel_desc,
- char* service_description,
- int32_t* nacl_pid,
- int32_t* success) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_InitializeModule:iihs:ii",
- pid,
- module,
- upcall_channel_desc,
- service_description,
- nacl_pid,
- success
- );
- return retval;
-}
-
-NaClSrpcError PppRpcClient::PPP_ShutdownModule(
- NaClSrpcChannel* channel) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_ShutdownModule::"
- );
- return retval;
-}
-
-NaClSrpcError PppRpcClient::PPP_GetInterface(
- NaClSrpcChannel* channel,
- char* interface_name,
- int32_t* exports_interface_name) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_GetInterface:s:i",
- interface_name,
- exports_interface_name
- );
- return retval;
-}
-
-NaClSrpcError PppAudioRpcClient::PPP_Audio_StreamCreated(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- NaClSrpcImcDescType out_shm,
- int32_t out_shm_size,
- NaClSrpcImcDescType out_socket) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Audio_StreamCreated:ihih:",
- instance,
- out_shm,
- out_shm_size,
- out_socket
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppFindRpcClient::PPP_Find_StartFind(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t text_bytes, char* text,
- int32_t case_sensitive,
- int32_t* supports_find) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Find_StartFind:iCi:i",
- instance,
- text_bytes, text,
- case_sensitive,
- supports_find
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppFindRpcClient::PPP_Find_SelectFindResult(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t forward) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Find_SelectFindResult:ii:",
- instance,
- forward
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppFindRpcClient::PPP_Find_StopFind(
- NaClSrpcChannel* channel,
- PP_Instance instance) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Find_StopFind:i:",
- instance
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInputEventRpcClient::PPP_InputEvent_HandleInputEvent(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t event_data_bytes, char* event_data,
- nacl_abi_size_t character_text_bytes, char* character_text,
- int32_t* handled) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_InputEvent_HandleInputEvent:iiCC:i",
- instance,
- resource,
- event_data_bytes, event_data,
- character_text_bytes, character_text,
- handled
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidCreate(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t argc,
- nacl_abi_size_t argn_bytes, char* argn,
- nacl_abi_size_t argv_bytes, char* argv,
- int32_t* success) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Instance_DidCreate:iiCC:i",
- instance,
- argc,
- argn_bytes, argn,
- argv_bytes, argv,
- success
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidDestroy(
- NaClSrpcChannel* channel,
- PP_Instance instance) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Instance_DidDestroy:i:",
- instance
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidChangeView(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t view_data_bytes, char* view_data) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Instance_DidChangeView:iiC:",
- instance,
- resource,
- view_data_bytes, view_data
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidChangeFocus(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- bool has_focus) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Instance_DidChangeFocus:ib:",
- instance,
- has_focus
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppInstanceRpcClient::PPP_Instance_HandleDocumentLoad(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource url_loader,
- int32_t* success) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Instance_HandleDocumentLoad:ii:i",
- instance,
- url_loader,
- success
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppMessagingRpcClient::PPP_Messaging_HandleMessage(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t message_bytes, char* message) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Messaging_HandleMessage:iC:",
- instance,
- message_bytes, message
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppMouseLockRpcClient::PPP_MouseLock_MouseLockLost(
- NaClSrpcChannel* channel,
- PP_Instance instance) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_MouseLock_MouseLockLost:i:",
- instance
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppPrintingRpcClient::PPP_Printing_QuerySupportedFormats(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t* formats) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Printing_QuerySupportedFormats:i:i",
- instance,
- formats
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppPrintingRpcClient::PPP_Printing_Begin(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t print_settings_bytes, char* print_settings,
- int32_t* pages_required) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Printing_Begin:iC:i",
- instance,
- print_settings_bytes, print_settings,
- pages_required
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppPrintingRpcClient::PPP_Printing_PrintPages(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t page_ranges_bytes, char* page_ranges,
- int32_t page_range_count,
- PP_Resource* image_data) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Printing_PrintPages:iCi:i",
- instance,
- page_ranges_bytes, page_ranges,
- page_range_count,
- image_data
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppPrintingRpcClient::PPP_Printing_End(
- NaClSrpcChannel* channel,
- PP_Instance instance) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Printing_End:i:",
- instance
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppPrintingRpcClient::PPP_Printing_IsScalingDisabled(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t* result) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Printing_IsScalingDisabled:i:i",
- instance,
- result
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppScrollbarRpcClient::PPP_Scrollbar_ValueChanged(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t value) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Scrollbar_ValueChanged:iii:",
- instance,
- scrollbar,
- value
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppScrollbarRpcClient::PPP_Scrollbar_OverlayChanged(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t overlay) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Scrollbar_OverlayChanged:iii:",
- instance,
- scrollbar,
- overlay
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppSelectionRpcClient::PPP_Selection_GetSelectedText(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t html,
- nacl_abi_size_t* selected_text_bytes, char* selected_text) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Selection_GetSelectedText:ii:C",
- instance,
- html,
- selected_text_bytes, selected_text
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppWidgetRpcClient::PPP_Widget_Invalidate(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource widget,
- nacl_abi_size_t dirty_rect_bytes, char* dirty_rect) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Widget_Invalidate:iiC:",
- instance,
- widget,
- dirty_rect_bytes, dirty_rect
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-NaClSrpcError PppZoomRpcClient::PPP_Zoom_Zoom(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- double factor,
- int32_t text_only) {
- NaClSrpcError retval;
- retval = NaClSrpcInvokeBySignature(
- channel,
- "PPP_Zoom_Zoom:idi:",
- instance,
- factor,
- text_only
- );
- if (retval == NACL_SRPC_RESULT_INTERNAL)
- ppapi_proxy::CleanUpAfterDeadNexe(instance);
- return retval;
-}
-
-
+// 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.
+//
+// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+//
+// Automatically generated code. See srpcgen.py
+//
+// NaCl Simple Remote Procedure Call interface abstractions.
+
+#include "trusted/srpcgen/ppp_rpc.h"
+#ifdef __native_client__
+#ifndef UNREFERENCED_PARAMETER
+#define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
+#endif // UNREFERENCED_PARAMETER
+#else
+#include "native_client/src/include/portability.h"
+#endif // __native_client__
+#include "native_client/src/shared/ppapi_proxy/browser_globals.h"
+#include "native_client/src/shared/srpc/nacl_srpc.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/pp_resource.h"
+
+NaClSrpcError CompletionCallbackRpcClient::RunCompletionCallback(
+ NaClSrpcChannel* channel,
+ int32_t callback_id,
+ int32_t result,
+ nacl_abi_size_t read_buffer_bytes, char* read_buffer) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "RunCompletionCallback:iiC:",
+ callback_id,
+ result,
+ read_buffer_bytes, read_buffer
+ );
+ return retval;
+}
+
+NaClSrpcError PppRpcClient::PPP_InitializeModule(
+ NaClSrpcChannel* channel,
+ int32_t pid,
+ PP_Module module,
+ NaClSrpcImcDescType upcall_channel_desc,
+ char* service_description,
+ int32_t* nacl_pid,
+ int32_t* success) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_InitializeModule:iihs:ii",
+ pid,
+ module,
+ upcall_channel_desc,
+ service_description,
+ nacl_pid,
+ success
+ );
+ return retval;
+}
+
+NaClSrpcError PppRpcClient::PPP_ShutdownModule(
+ NaClSrpcChannel* channel) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_ShutdownModule::"
+ );
+ return retval;
+}
+
+NaClSrpcError PppRpcClient::PPP_GetInterface(
+ NaClSrpcChannel* channel,
+ char* interface_name,
+ int32_t* exports_interface_name) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_GetInterface:s:i",
+ interface_name,
+ exports_interface_name
+ );
+ return retval;
+}
+
+NaClSrpcError PppAudioRpcClient::PPP_Audio_StreamCreated(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ NaClSrpcImcDescType out_shm,
+ int32_t out_shm_size,
+ NaClSrpcImcDescType out_socket) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Audio_StreamCreated:ihih:",
+ instance,
+ out_shm,
+ out_shm_size,
+ out_socket
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppFindRpcClient::PPP_Find_StartFind(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t text_bytes, char* text,
+ int32_t case_sensitive,
+ int32_t* supports_find) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Find_StartFind:iCi:i",
+ instance,
+ text_bytes, text,
+ case_sensitive,
+ supports_find
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppFindRpcClient::PPP_Find_SelectFindResult(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t forward) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Find_SelectFindResult:ii:",
+ instance,
+ forward
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppFindRpcClient::PPP_Find_StopFind(
+ NaClSrpcChannel* channel,
+ PP_Instance instance) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Find_StopFind:i:",
+ instance
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInputEventRpcClient::PPP_InputEvent_HandleInputEvent(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t event_data_bytes, char* event_data,
+ nacl_abi_size_t character_text_bytes, char* character_text,
+ int32_t* handled) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_InputEvent_HandleInputEvent:iiCC:i",
+ instance,
+ resource,
+ event_data_bytes, event_data,
+ character_text_bytes, character_text,
+ handled
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidCreate(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t argc,
+ nacl_abi_size_t argn_bytes, char* argn,
+ nacl_abi_size_t argv_bytes, char* argv,
+ int32_t* success) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Instance_DidCreate:iiCC:i",
+ instance,
+ argc,
+ argn_bytes, argn,
+ argv_bytes, argv,
+ success
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidDestroy(
+ NaClSrpcChannel* channel,
+ PP_Instance instance) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Instance_DidDestroy:i:",
+ instance
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidChangeView(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t view_data_bytes, char* view_data) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Instance_DidChangeView:iiC:",
+ instance,
+ resource,
+ view_data_bytes, view_data
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInstanceRpcClient::PPP_Instance_DidChangeFocus(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ bool has_focus) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Instance_DidChangeFocus:ib:",
+ instance,
+ has_focus
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppInstanceRpcClient::PPP_Instance_HandleDocumentLoad(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource url_loader,
+ int32_t* success) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Instance_HandleDocumentLoad:ii:i",
+ instance,
+ url_loader,
+ success
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppMessagingRpcClient::PPP_Messaging_HandleMessage(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t message_bytes, char* message) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Messaging_HandleMessage:iC:",
+ instance,
+ message_bytes, message
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppMouseLockRpcClient::PPP_MouseLock_MouseLockLost(
+ NaClSrpcChannel* channel,
+ PP_Instance instance) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_MouseLock_MouseLockLost:i:",
+ instance
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppPrintingRpcClient::PPP_Printing_QuerySupportedFormats(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t* formats) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Printing_QuerySupportedFormats:i:i",
+ instance,
+ formats
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppPrintingRpcClient::PPP_Printing_Begin(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t print_settings_bytes, char* print_settings,
+ int32_t* pages_required) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Printing_Begin:iC:i",
+ instance,
+ print_settings_bytes, print_settings,
+ pages_required
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppPrintingRpcClient::PPP_Printing_PrintPages(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t page_ranges_bytes, char* page_ranges,
+ int32_t page_range_count,
+ PP_Resource* image_data) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Printing_PrintPages:iCi:i",
+ instance,
+ page_ranges_bytes, page_ranges,
+ page_range_count,
+ image_data
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppPrintingRpcClient::PPP_Printing_End(
+ NaClSrpcChannel* channel,
+ PP_Instance instance) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Printing_End:i:",
+ instance
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppPrintingRpcClient::PPP_Printing_IsScalingDisabled(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t* result) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Printing_IsScalingDisabled:i:i",
+ instance,
+ result
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppScrollbarRpcClient::PPP_Scrollbar_ValueChanged(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t value) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Scrollbar_ValueChanged:iii:",
+ instance,
+ scrollbar,
+ value
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppScrollbarRpcClient::PPP_Scrollbar_OverlayChanged(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t overlay) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Scrollbar_OverlayChanged:iii:",
+ instance,
+ scrollbar,
+ overlay
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppSelectionRpcClient::PPP_Selection_GetSelectedText(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t html,
+ nacl_abi_size_t* selected_text_bytes, char* selected_text) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Selection_GetSelectedText:ii:C",
+ instance,
+ html,
+ selected_text_bytes, selected_text
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppWidgetRpcClient::PPP_Widget_Invalidate(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource widget,
+ nacl_abi_size_t dirty_rect_bytes, char* dirty_rect) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Widget_Invalidate:iiC:",
+ instance,
+ widget,
+ dirty_rect_bytes, dirty_rect
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+NaClSrpcError PppZoomRpcClient::PPP_Zoom_Zoom(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ double factor,
+ int32_t text_only) {
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPP_Zoom_Zoom:idi:",
+ instance,
+ factor,
+ text_only
+ );
+ if (retval == NACL_SRPC_RESULT_INTERNAL)
+ ppapi_proxy::CleanUpAfterDeadNexe(instance);
+ return retval;
+}
+
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_server.cc
index e3e6798..1d17369 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_server.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/ppp_rpc_server.cc
@@ -1,456 +1,456 @@
-// 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.
-//
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-//
-// Automatically generated code. See srpcgen.py
-//
-// NaCl Simple Remote Procedure Call interface abstractions.
-
-#include "untrusted/srpcgen/ppp_rpc.h"
-#ifdef __native_client__
-#ifndef UNREFERENCED_PARAMETER
-#define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
-#endif // UNREFERENCED_PARAMETER
-#else
-#include "native_client/src/include/portability.h"
-#endif // __native_client__
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
-#include "ppapi/c/pp_resource.h"
-
-namespace {
-
-static void RunCompletionCallbackDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- CompletionCallbackRpcServer::RunCompletionCallback(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.count, inputs[2]->arrays.carr
- );
-}
-
-static void PPP_InitializeModuleDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppRpcServer::PPP_InitializeModule(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.hval,
- inputs[3]->arrays.str,
- &(outputs[0]->u.ival),
- &(outputs[1]->u.ival)
- );
-}
-
-static void PPP_ShutdownModuleDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(inputs);
- UNREFERENCED_PARAMETER(outputs);
- PppRpcServer::PPP_ShutdownModule(
- rpc,
- done
- );
-}
-
-static void PPP_GetInterfaceDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppRpcServer::PPP_GetInterface(
- rpc,
- done,
- inputs[0]->arrays.str,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Audio_StreamCreatedDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppAudioRpcServer::PPP_Audio_StreamCreated(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.hval,
- inputs[2]->u.ival,
- inputs[3]->u.hval
- );
-}
-
-static void PPP_Find_StartFindDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppFindRpcServer::PPP_Find_StartFind(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.count, inputs[1]->arrays.carr,
- inputs[2]->u.ival,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Find_SelectFindResultDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppFindRpcServer::PPP_Find_SelectFindResult(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival
- );
-}
-
-static void PPP_Find_StopFindDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppFindRpcServer::PPP_Find_StopFind(
- rpc,
- done,
- inputs[0]->u.ival
- );
-}
-
-static void PPP_InputEvent_HandleInputEventDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppInputEventRpcServer::PPP_InputEvent_HandleInputEvent(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.count, inputs[2]->arrays.carr,
- inputs[3]->u.count, inputs[3]->arrays.carr,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Instance_DidCreateDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppInstanceRpcServer::PPP_Instance_DidCreate(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.count, inputs[2]->arrays.carr,
- inputs[3]->u.count, inputs[3]->arrays.carr,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Instance_DidDestroyDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppInstanceRpcServer::PPP_Instance_DidDestroy(
- rpc,
- done,
- inputs[0]->u.ival
- );
-}
-
-static void PPP_Instance_DidChangeViewDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppInstanceRpcServer::PPP_Instance_DidChangeView(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.count, inputs[2]->arrays.carr
- );
-}
-
-static void PPP_Instance_DidChangeFocusDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppInstanceRpcServer::PPP_Instance_DidChangeFocus(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.bval
- );
-}
-
-static void PPP_Instance_HandleDocumentLoadDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppInstanceRpcServer::PPP_Instance_HandleDocumentLoad(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Messaging_HandleMessageDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppMessagingRpcServer::PPP_Messaging_HandleMessage(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.count, inputs[1]->arrays.carr
- );
-}
-
-static void PPP_MouseLock_MouseLockLostDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppMouseLockRpcServer::PPP_MouseLock_MouseLockLost(
- rpc,
- done,
- inputs[0]->u.ival
- );
-}
-
-static void PPP_Printing_QuerySupportedFormatsDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppPrintingRpcServer::PPP_Printing_QuerySupportedFormats(
- rpc,
- done,
- inputs[0]->u.ival,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Printing_BeginDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppPrintingRpcServer::PPP_Printing_Begin(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.count, inputs[1]->arrays.carr,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Printing_PrintPagesDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppPrintingRpcServer::PPP_Printing_PrintPages(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.count, inputs[1]->arrays.carr,
- inputs[2]->u.ival,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Printing_EndDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppPrintingRpcServer::PPP_Printing_End(
- rpc,
- done,
- inputs[0]->u.ival
- );
-}
-
-static void PPP_Printing_IsScalingDisabledDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppPrintingRpcServer::PPP_Printing_IsScalingDisabled(
- rpc,
- done,
- inputs[0]->u.ival,
- &(outputs[0]->u.ival)
- );
-}
-
-static void PPP_Scrollbar_ValueChangedDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppScrollbarRpcServer::PPP_Scrollbar_ValueChanged(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.ival
- );
-}
-
-static void PPP_Scrollbar_OverlayChangedDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppScrollbarRpcServer::PPP_Scrollbar_OverlayChanged(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.ival
- );
-}
-
-static void PPP_Selection_GetSelectedTextDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- PppSelectionRpcServer::PPP_Selection_GetSelectedText(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- &(outputs[0]->u.count), outputs[0]->arrays.carr
- );
-}
-
-static void PPP_Widget_InvalidateDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppWidgetRpcServer::PPP_Widget_Invalidate(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.ival,
- inputs[2]->u.count, inputs[2]->arrays.carr
- );
-}
-
-static void PPP_Zoom_ZoomDispatcher(
- NaClSrpcRpc* rpc,
- NaClSrpcArg** inputs,
- NaClSrpcArg** outputs,
- NaClSrpcClosure* done
-) {
- UNREFERENCED_PARAMETER(outputs);
- PppZoomRpcServer::PPP_Zoom_Zoom(
- rpc,
- done,
- inputs[0]->u.ival,
- inputs[1]->u.dval,
- inputs[2]->u.ival
- );
-}
-
-} // namespace
-
-NaClSrpcHandlerDesc PppRpcs::srpc_methods[] = {
- { "RunCompletionCallback:iiC:", RunCompletionCallbackDispatcher },
- { "PPP_InitializeModule:iihs:ii", PPP_InitializeModuleDispatcher },
- { "PPP_ShutdownModule::", PPP_ShutdownModuleDispatcher },
- { "PPP_GetInterface:s:i", PPP_GetInterfaceDispatcher },
- { "PPP_Audio_StreamCreated:ihih:", PPP_Audio_StreamCreatedDispatcher },
- { "PPP_Find_StartFind:iCi:i", PPP_Find_StartFindDispatcher },
- { "PPP_Find_SelectFindResult:ii:", PPP_Find_SelectFindResultDispatcher },
- { "PPP_Find_StopFind:i:", PPP_Find_StopFindDispatcher },
- { "PPP_InputEvent_HandleInputEvent:iiCC:i", PPP_InputEvent_HandleInputEventDispatcher },
- { "PPP_Instance_DidCreate:iiCC:i", PPP_Instance_DidCreateDispatcher },
- { "PPP_Instance_DidDestroy:i:", PPP_Instance_DidDestroyDispatcher },
- { "PPP_Instance_DidChangeView:iiC:", PPP_Instance_DidChangeViewDispatcher },
- { "PPP_Instance_DidChangeFocus:ib:", PPP_Instance_DidChangeFocusDispatcher },
- { "PPP_Instance_HandleDocumentLoad:ii:i", PPP_Instance_HandleDocumentLoadDispatcher },
- { "PPP_Messaging_HandleMessage:iC:", PPP_Messaging_HandleMessageDispatcher },
- { "PPP_MouseLock_MouseLockLost:i:", PPP_MouseLock_MouseLockLostDispatcher },
- { "PPP_Printing_QuerySupportedFormats:i:i", PPP_Printing_QuerySupportedFormatsDispatcher },
- { "PPP_Printing_Begin:iC:i", PPP_Printing_BeginDispatcher },
- { "PPP_Printing_PrintPages:iCi:i", PPP_Printing_PrintPagesDispatcher },
- { "PPP_Printing_End:i:", PPP_Printing_EndDispatcher },
- { "PPP_Printing_IsScalingDisabled:i:i", PPP_Printing_IsScalingDisabledDispatcher },
- { "PPP_Scrollbar_ValueChanged:iii:", PPP_Scrollbar_ValueChangedDispatcher },
- { "PPP_Scrollbar_OverlayChanged:iii:", PPP_Scrollbar_OverlayChangedDispatcher },
- { "PPP_Selection_GetSelectedText:ii:C", PPP_Selection_GetSelectedTextDispatcher },
- { "PPP_Widget_Invalidate:iiC:", PPP_Widget_InvalidateDispatcher },
- { "PPP_Zoom_Zoom:idi:", PPP_Zoom_ZoomDispatcher },
- { NULL, NULL }
-};
-
+// 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.
+//
+// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+//
+// Automatically generated code. See srpcgen.py
+//
+// NaCl Simple Remote Procedure Call interface abstractions.
+
+#include "untrusted/srpcgen/ppp_rpc.h"
+#ifdef __native_client__
+#ifndef UNREFERENCED_PARAMETER
+#define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
+#endif // UNREFERENCED_PARAMETER
+#else
+#include "native_client/src/include/portability.h"
+#endif // __native_client__
+#include "native_client/src/shared/srpc/nacl_srpc.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/pp_resource.h"
+
+namespace {
+
+static void RunCompletionCallbackDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ CompletionCallbackRpcServer::RunCompletionCallback(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.count, inputs[2]->arrays.carr
+ );
+}
+
+static void PPP_InitializeModuleDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppRpcServer::PPP_InitializeModule(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.hval,
+ inputs[3]->arrays.str,
+ &(outputs[0]->u.ival),
+ &(outputs[1]->u.ival)
+ );
+}
+
+static void PPP_ShutdownModuleDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(inputs);
+ UNREFERENCED_PARAMETER(outputs);
+ PppRpcServer::PPP_ShutdownModule(
+ rpc,
+ done
+ );
+}
+
+static void PPP_GetInterfaceDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppRpcServer::PPP_GetInterface(
+ rpc,
+ done,
+ inputs[0]->arrays.str,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Audio_StreamCreatedDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppAudioRpcServer::PPP_Audio_StreamCreated(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.hval,
+ inputs[2]->u.ival,
+ inputs[3]->u.hval
+ );
+}
+
+static void PPP_Find_StartFindDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppFindRpcServer::PPP_Find_StartFind(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.count, inputs[1]->arrays.carr,
+ inputs[2]->u.ival,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Find_SelectFindResultDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppFindRpcServer::PPP_Find_SelectFindResult(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival
+ );
+}
+
+static void PPP_Find_StopFindDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppFindRpcServer::PPP_Find_StopFind(
+ rpc,
+ done,
+ inputs[0]->u.ival
+ );
+}
+
+static void PPP_InputEvent_HandleInputEventDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppInputEventRpcServer::PPP_InputEvent_HandleInputEvent(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.count, inputs[2]->arrays.carr,
+ inputs[3]->u.count, inputs[3]->arrays.carr,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Instance_DidCreateDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppInstanceRpcServer::PPP_Instance_DidCreate(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.count, inputs[2]->arrays.carr,
+ inputs[3]->u.count, inputs[3]->arrays.carr,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Instance_DidDestroyDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppInstanceRpcServer::PPP_Instance_DidDestroy(
+ rpc,
+ done,
+ inputs[0]->u.ival
+ );
+}
+
+static void PPP_Instance_DidChangeViewDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppInstanceRpcServer::PPP_Instance_DidChangeView(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.count, inputs[2]->arrays.carr
+ );
+}
+
+static void PPP_Instance_DidChangeFocusDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppInstanceRpcServer::PPP_Instance_DidChangeFocus(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.bval
+ );
+}
+
+static void PPP_Instance_HandleDocumentLoadDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppInstanceRpcServer::PPP_Instance_HandleDocumentLoad(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Messaging_HandleMessageDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppMessagingRpcServer::PPP_Messaging_HandleMessage(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.count, inputs[1]->arrays.carr
+ );
+}
+
+static void PPP_MouseLock_MouseLockLostDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppMouseLockRpcServer::PPP_MouseLock_MouseLockLost(
+ rpc,
+ done,
+ inputs[0]->u.ival
+ );
+}
+
+static void PPP_Printing_QuerySupportedFormatsDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppPrintingRpcServer::PPP_Printing_QuerySupportedFormats(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Printing_BeginDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppPrintingRpcServer::PPP_Printing_Begin(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.count, inputs[1]->arrays.carr,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Printing_PrintPagesDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppPrintingRpcServer::PPP_Printing_PrintPages(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.count, inputs[1]->arrays.carr,
+ inputs[2]->u.ival,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Printing_EndDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppPrintingRpcServer::PPP_Printing_End(
+ rpc,
+ done,
+ inputs[0]->u.ival
+ );
+}
+
+static void PPP_Printing_IsScalingDisabledDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppPrintingRpcServer::PPP_Printing_IsScalingDisabled(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ &(outputs[0]->u.ival)
+ );
+}
+
+static void PPP_Scrollbar_ValueChangedDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppScrollbarRpcServer::PPP_Scrollbar_ValueChanged(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.ival
+ );
+}
+
+static void PPP_Scrollbar_OverlayChangedDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppScrollbarRpcServer::PPP_Scrollbar_OverlayChanged(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.ival
+ );
+}
+
+static void PPP_Selection_GetSelectedTextDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ PppSelectionRpcServer::PPP_Selection_GetSelectedText(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ &(outputs[0]->u.count), outputs[0]->arrays.carr
+ );
+}
+
+static void PPP_Widget_InvalidateDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppWidgetRpcServer::PPP_Widget_Invalidate(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.ival,
+ inputs[2]->u.count, inputs[2]->arrays.carr
+ );
+}
+
+static void PPP_Zoom_ZoomDispatcher(
+ NaClSrpcRpc* rpc,
+ NaClSrpcArg** inputs,
+ NaClSrpcArg** outputs,
+ NaClSrpcClosure* done
+) {
+ UNREFERENCED_PARAMETER(outputs);
+ PppZoomRpcServer::PPP_Zoom_Zoom(
+ rpc,
+ done,
+ inputs[0]->u.ival,
+ inputs[1]->u.dval,
+ inputs[2]->u.ival
+ );
+}
+
+} // namespace
+
+NaClSrpcHandlerDesc PppRpcs::srpc_methods[] = {
+ { "RunCompletionCallback:iiC:", RunCompletionCallbackDispatcher },
+ { "PPP_InitializeModule:iihs:ii", PPP_InitializeModuleDispatcher },
+ { "PPP_ShutdownModule::", PPP_ShutdownModuleDispatcher },
+ { "PPP_GetInterface:s:i", PPP_GetInterfaceDispatcher },
+ { "PPP_Audio_StreamCreated:ihih:", PPP_Audio_StreamCreatedDispatcher },
+ { "PPP_Find_StartFind:iCi:i", PPP_Find_StartFindDispatcher },
+ { "PPP_Find_SelectFindResult:ii:", PPP_Find_SelectFindResultDispatcher },
+ { "PPP_Find_StopFind:i:", PPP_Find_StopFindDispatcher },
+ { "PPP_InputEvent_HandleInputEvent:iiCC:i", PPP_InputEvent_HandleInputEventDispatcher },
+ { "PPP_Instance_DidCreate:iiCC:i", PPP_Instance_DidCreateDispatcher },
+ { "PPP_Instance_DidDestroy:i:", PPP_Instance_DidDestroyDispatcher },
+ { "PPP_Instance_DidChangeView:iiC:", PPP_Instance_DidChangeViewDispatcher },
+ { "PPP_Instance_DidChangeFocus:ib:", PPP_Instance_DidChangeFocusDispatcher },
+ { "PPP_Instance_HandleDocumentLoad:ii:i", PPP_Instance_HandleDocumentLoadDispatcher },
+ { "PPP_Messaging_HandleMessage:iC:", PPP_Messaging_HandleMessageDispatcher },
+ { "PPP_MouseLock_MouseLockLost:i:", PPP_MouseLock_MouseLockLostDispatcher },
+ { "PPP_Printing_QuerySupportedFormats:i:i", PPP_Printing_QuerySupportedFormatsDispatcher },
+ { "PPP_Printing_Begin:iC:i", PPP_Printing_BeginDispatcher },
+ { "PPP_Printing_PrintPages:iCi:i", PPP_Printing_PrintPagesDispatcher },
+ { "PPP_Printing_End:i:", PPP_Printing_EndDispatcher },
+ { "PPP_Printing_IsScalingDisabled:i:i", PPP_Printing_IsScalingDisabledDispatcher },
+ { "PPP_Scrollbar_ValueChanged:iii:", PPP_Scrollbar_ValueChangedDispatcher },
+ { "PPP_Scrollbar_OverlayChanged:iii:", PPP_Scrollbar_OverlayChangedDispatcher },
+ { "PPP_Selection_GetSelectedText:ii:C", PPP_Selection_GetSelectedTextDispatcher },
+ { "PPP_Widget_Invalidate:iiC:", PPP_Widget_InvalidateDispatcher },
+ { "PPP_Zoom_Zoom:idi:", PPP_Zoom_ZoomDispatcher },
+ { NULL, NULL }
+};
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h b/ppapi/native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h
index 1c62a3b..718045a 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h
@@ -1,266 +1,266 @@
-// 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.
-//
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-//
-// Automatically generated code. See srpcgen.py
-//
-// NaCl Simple Remote Procedure Call interface abstractions.
-
-#ifndef GEN_PPAPI_PROXY_PPP_RPC_H_
-#define GEN_PPAPI_PROXY_PPP_RPC_H_
-
-#ifndef __native_client__
-#include "native_client/src/include/portability.h"
-#endif // __native_client__
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
-#include "ppapi/c/pp_resource.h"
-
-class CompletionCallbackRpcClient {
- public:
- static NaClSrpcError RunCompletionCallback(
- NaClSrpcChannel* channel,
- int32_t callback_id,
- int32_t result,
- nacl_abi_size_t read_buffer_bytes, char* read_buffer);
-
- private:
- CompletionCallbackRpcClient();
- CompletionCallbackRpcClient(const CompletionCallbackRpcClient&);
- void operator=(const CompletionCallbackRpcClient);
-}; // class CompletionCallbackRpcClient
-
-class PppRpcClient {
- public:
- static NaClSrpcError PPP_InitializeModule(
- NaClSrpcChannel* channel,
- int32_t pid,
- PP_Module module,
- NaClSrpcImcDescType upcall_channel_desc,
- char* service_description,
- int32_t* nacl_pid,
- int32_t* success);
- static NaClSrpcError PPP_ShutdownModule(
- NaClSrpcChannel* channel);
- static NaClSrpcError PPP_GetInterface(
- NaClSrpcChannel* channel,
- char* interface_name,
- int32_t* exports_interface_name);
-
- private:
- PppRpcClient();
- PppRpcClient(const PppRpcClient&);
- void operator=(const PppRpcClient);
-}; // class PppRpcClient
-
-class PppAudioRpcClient {
- public:
- static NaClSrpcError PPP_Audio_StreamCreated(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- NaClSrpcImcDescType out_shm,
- int32_t out_shm_size,
- NaClSrpcImcDescType out_socket);
-
- private:
- PppAudioRpcClient();
- PppAudioRpcClient(const PppAudioRpcClient&);
- void operator=(const PppAudioRpcClient);
-}; // class PppAudioRpcClient
-
-class PppFindRpcClient {
- public:
- static NaClSrpcError PPP_Find_StartFind(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t text_bytes, char* text,
- int32_t case_sensitive,
- int32_t* supports_find);
- static NaClSrpcError PPP_Find_SelectFindResult(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t forward);
- static NaClSrpcError PPP_Find_StopFind(
- NaClSrpcChannel* channel,
- PP_Instance instance);
-
- private:
- PppFindRpcClient();
- PppFindRpcClient(const PppFindRpcClient&);
- void operator=(const PppFindRpcClient);
-}; // class PppFindRpcClient
-
-class PppInputEventRpcClient {
- public:
- static NaClSrpcError PPP_InputEvent_HandleInputEvent(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t event_data_bytes, char* event_data,
- nacl_abi_size_t character_text_bytes, char* character_text,
- int32_t* handled);
-
- private:
- PppInputEventRpcClient();
- PppInputEventRpcClient(const PppInputEventRpcClient&);
- void operator=(const PppInputEventRpcClient);
-}; // class PppInputEventRpcClient
-
-class PppInstanceRpcClient {
- public:
- static NaClSrpcError PPP_Instance_DidCreate(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t argc,
- nacl_abi_size_t argn_bytes, char* argn,
- nacl_abi_size_t argv_bytes, char* argv,
- int32_t* success);
- static NaClSrpcError PPP_Instance_DidDestroy(
- NaClSrpcChannel* channel,
- PP_Instance instance);
- static NaClSrpcError PPP_Instance_DidChangeView(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t view_data_bytes, char* view_data);
- static NaClSrpcError PPP_Instance_DidChangeFocus(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- bool has_focus);
- static NaClSrpcError PPP_Instance_HandleDocumentLoad(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource url_loader,
- int32_t* success);
-
- private:
- PppInstanceRpcClient();
- PppInstanceRpcClient(const PppInstanceRpcClient&);
- void operator=(const PppInstanceRpcClient);
-}; // class PppInstanceRpcClient
-
-class PppMessagingRpcClient {
- public:
- static NaClSrpcError PPP_Messaging_HandleMessage(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t message_bytes, char* message);
-
- private:
- PppMessagingRpcClient();
- PppMessagingRpcClient(const PppMessagingRpcClient&);
- void operator=(const PppMessagingRpcClient);
-}; // class PppMessagingRpcClient
-
-class PppMouseLockRpcClient {
- public:
- static NaClSrpcError PPP_MouseLock_MouseLockLost(
- NaClSrpcChannel* channel,
- PP_Instance instance);
-
- private:
- PppMouseLockRpcClient();
- PppMouseLockRpcClient(const PppMouseLockRpcClient&);
- void operator=(const PppMouseLockRpcClient);
-}; // class PppMouseLockRpcClient
-
-class PppPrintingRpcClient {
- public:
- static NaClSrpcError PPP_Printing_QuerySupportedFormats(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t* formats);
- static NaClSrpcError PPP_Printing_Begin(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t print_settings_bytes, char* print_settings,
- int32_t* pages_required);
- static NaClSrpcError PPP_Printing_PrintPages(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- nacl_abi_size_t page_ranges_bytes, char* page_ranges,
- int32_t page_range_count,
- PP_Resource* image_data);
- static NaClSrpcError PPP_Printing_End(
- NaClSrpcChannel* channel,
- PP_Instance instance);
- static NaClSrpcError PPP_Printing_IsScalingDisabled(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t* result);
-
- private:
- PppPrintingRpcClient();
- PppPrintingRpcClient(const PppPrintingRpcClient&);
- void operator=(const PppPrintingRpcClient);
-}; // class PppPrintingRpcClient
-
-class PppScrollbarRpcClient {
- public:
- static NaClSrpcError PPP_Scrollbar_ValueChanged(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t value);
- static NaClSrpcError PPP_Scrollbar_OverlayChanged(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t overlay);
-
- private:
- PppScrollbarRpcClient();
- PppScrollbarRpcClient(const PppScrollbarRpcClient&);
- void operator=(const PppScrollbarRpcClient);
-}; // class PppScrollbarRpcClient
-
-class PppSelectionRpcClient {
- public:
- static NaClSrpcError PPP_Selection_GetSelectedText(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- int32_t html,
- nacl_abi_size_t* selected_text_bytes, char* selected_text);
-
- private:
- PppSelectionRpcClient();
- PppSelectionRpcClient(const PppSelectionRpcClient&);
- void operator=(const PppSelectionRpcClient);
-}; // class PppSelectionRpcClient
-
-class PppWidgetRpcClient {
- public:
- static NaClSrpcError PPP_Widget_Invalidate(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- PP_Resource widget,
- nacl_abi_size_t dirty_rect_bytes, char* dirty_rect);
-
- private:
- PppWidgetRpcClient();
- PppWidgetRpcClient(const PppWidgetRpcClient&);
- void operator=(const PppWidgetRpcClient);
-}; // class PppWidgetRpcClient
-
-class PppZoomRpcClient {
- public:
- static NaClSrpcError PPP_Zoom_Zoom(
- NaClSrpcChannel* channel,
- PP_Instance instance,
- double factor,
- int32_t text_only);
-
- private:
- PppZoomRpcClient();
- PppZoomRpcClient(const PppZoomRpcClient&);
- void operator=(const PppZoomRpcClient);
-}; // class PppZoomRpcClient
-
-
-
-
-#endif // GEN_PPAPI_PROXY_PPP_RPC_H_
-
+// 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.
+//
+// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+//
+// Automatically generated code. See srpcgen.py
+//
+// NaCl Simple Remote Procedure Call interface abstractions.
+
+#ifndef GEN_PPAPI_PROXY_PPP_RPC_H_
+#define GEN_PPAPI_PROXY_PPP_RPC_H_
+
+#ifndef __native_client__
+#include "native_client/src/include/portability.h"
+#endif // __native_client__
+#include "native_client/src/shared/srpc/nacl_srpc.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/pp_resource.h"
+
+class CompletionCallbackRpcClient {
+ public:
+ static NaClSrpcError RunCompletionCallback(
+ NaClSrpcChannel* channel,
+ int32_t callback_id,
+ int32_t result,
+ nacl_abi_size_t read_buffer_bytes, char* read_buffer);
+
+ private:
+ CompletionCallbackRpcClient();
+ CompletionCallbackRpcClient(const CompletionCallbackRpcClient&);
+ void operator=(const CompletionCallbackRpcClient);
+}; // class CompletionCallbackRpcClient
+
+class PppRpcClient {
+ public:
+ static NaClSrpcError PPP_InitializeModule(
+ NaClSrpcChannel* channel,
+ int32_t pid,
+ PP_Module module,
+ NaClSrpcImcDescType upcall_channel_desc,
+ char* service_description,
+ int32_t* nacl_pid,
+ int32_t* success);
+ static NaClSrpcError PPP_ShutdownModule(
+ NaClSrpcChannel* channel);
+ static NaClSrpcError PPP_GetInterface(
+ NaClSrpcChannel* channel,
+ char* interface_name,
+ int32_t* exports_interface_name);
+
+ private:
+ PppRpcClient();
+ PppRpcClient(const PppRpcClient&);
+ void operator=(const PppRpcClient);
+}; // class PppRpcClient
+
+class PppAudioRpcClient {
+ public:
+ static NaClSrpcError PPP_Audio_StreamCreated(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ NaClSrpcImcDescType out_shm,
+ int32_t out_shm_size,
+ NaClSrpcImcDescType out_socket);
+
+ private:
+ PppAudioRpcClient();
+ PppAudioRpcClient(const PppAudioRpcClient&);
+ void operator=(const PppAudioRpcClient);
+}; // class PppAudioRpcClient
+
+class PppFindRpcClient {
+ public:
+ static NaClSrpcError PPP_Find_StartFind(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t text_bytes, char* text,
+ int32_t case_sensitive,
+ int32_t* supports_find);
+ static NaClSrpcError PPP_Find_SelectFindResult(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t forward);
+ static NaClSrpcError PPP_Find_StopFind(
+ NaClSrpcChannel* channel,
+ PP_Instance instance);
+
+ private:
+ PppFindRpcClient();
+ PppFindRpcClient(const PppFindRpcClient&);
+ void operator=(const PppFindRpcClient);
+}; // class PppFindRpcClient
+
+class PppInputEventRpcClient {
+ public:
+ static NaClSrpcError PPP_InputEvent_HandleInputEvent(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t event_data_bytes, char* event_data,
+ nacl_abi_size_t character_text_bytes, char* character_text,
+ int32_t* handled);
+
+ private:
+ PppInputEventRpcClient();
+ PppInputEventRpcClient(const PppInputEventRpcClient&);
+ void operator=(const PppInputEventRpcClient);
+}; // class PppInputEventRpcClient
+
+class PppInstanceRpcClient {
+ public:
+ static NaClSrpcError PPP_Instance_DidCreate(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t argc,
+ nacl_abi_size_t argn_bytes, char* argn,
+ nacl_abi_size_t argv_bytes, char* argv,
+ int32_t* success);
+ static NaClSrpcError PPP_Instance_DidDestroy(
+ NaClSrpcChannel* channel,
+ PP_Instance instance);
+ static NaClSrpcError PPP_Instance_DidChangeView(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t view_data_bytes, char* view_data);
+ static NaClSrpcError PPP_Instance_DidChangeFocus(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ bool has_focus);
+ static NaClSrpcError PPP_Instance_HandleDocumentLoad(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource url_loader,
+ int32_t* success);
+
+ private:
+ PppInstanceRpcClient();
+ PppInstanceRpcClient(const PppInstanceRpcClient&);
+ void operator=(const PppInstanceRpcClient);
+}; // class PppInstanceRpcClient
+
+class PppMessagingRpcClient {
+ public:
+ static NaClSrpcError PPP_Messaging_HandleMessage(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t message_bytes, char* message);
+
+ private:
+ PppMessagingRpcClient();
+ PppMessagingRpcClient(const PppMessagingRpcClient&);
+ void operator=(const PppMessagingRpcClient);
+}; // class PppMessagingRpcClient
+
+class PppMouseLockRpcClient {
+ public:
+ static NaClSrpcError PPP_MouseLock_MouseLockLost(
+ NaClSrpcChannel* channel,
+ PP_Instance instance);
+
+ private:
+ PppMouseLockRpcClient();
+ PppMouseLockRpcClient(const PppMouseLockRpcClient&);
+ void operator=(const PppMouseLockRpcClient);
+}; // class PppMouseLockRpcClient
+
+class PppPrintingRpcClient {
+ public:
+ static NaClSrpcError PPP_Printing_QuerySupportedFormats(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t* formats);
+ static NaClSrpcError PPP_Printing_Begin(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t print_settings_bytes, char* print_settings,
+ int32_t* pages_required);
+ static NaClSrpcError PPP_Printing_PrintPages(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t page_ranges_bytes, char* page_ranges,
+ int32_t page_range_count,
+ PP_Resource* image_data);
+ static NaClSrpcError PPP_Printing_End(
+ NaClSrpcChannel* channel,
+ PP_Instance instance);
+ static NaClSrpcError PPP_Printing_IsScalingDisabled(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t* result);
+
+ private:
+ PppPrintingRpcClient();
+ PppPrintingRpcClient(const PppPrintingRpcClient&);
+ void operator=(const PppPrintingRpcClient);
+}; // class PppPrintingRpcClient
+
+class PppScrollbarRpcClient {
+ public:
+ static NaClSrpcError PPP_Scrollbar_ValueChanged(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t value);
+ static NaClSrpcError PPP_Scrollbar_OverlayChanged(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t overlay);
+
+ private:
+ PppScrollbarRpcClient();
+ PppScrollbarRpcClient(const PppScrollbarRpcClient&);
+ void operator=(const PppScrollbarRpcClient);
+}; // class PppScrollbarRpcClient
+
+class PppSelectionRpcClient {
+ public:
+ static NaClSrpcError PPP_Selection_GetSelectedText(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ int32_t html,
+ nacl_abi_size_t* selected_text_bytes, char* selected_text);
+
+ private:
+ PppSelectionRpcClient();
+ PppSelectionRpcClient(const PppSelectionRpcClient&);
+ void operator=(const PppSelectionRpcClient);
+}; // class PppSelectionRpcClient
+
+class PppWidgetRpcClient {
+ public:
+ static NaClSrpcError PPP_Widget_Invalidate(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource widget,
+ nacl_abi_size_t dirty_rect_bytes, char* dirty_rect);
+
+ private:
+ PppWidgetRpcClient();
+ PppWidgetRpcClient(const PppWidgetRpcClient&);
+ void operator=(const PppWidgetRpcClient);
+}; // class PppWidgetRpcClient
+
+class PppZoomRpcClient {
+ public:
+ static NaClSrpcError PPP_Zoom_Zoom(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ double factor,
+ int32_t text_only);
+
+ private:
+ PppZoomRpcClient();
+ PppZoomRpcClient(const PppZoomRpcClient&);
+ void operator=(const PppZoomRpcClient);
+}; // class PppZoomRpcClient
+
+
+
+
+#endif // GEN_PPAPI_PROXY_PPP_RPC_H_
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h b/ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h
index daa01f3..8bd2e80 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h
@@ -1,295 +1,295 @@
-// 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.
-//
-// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-//
-// Automatically generated code. See srpcgen.py
-//
-// NaCl Simple Remote Procedure Call interface abstractions.
-
-#ifndef GEN_PPAPI_PROXY_PPP_RPC_H_
-#define GEN_PPAPI_PROXY_PPP_RPC_H_
-
-#ifndef __native_client__
-#include "native_client/src/include/portability.h"
-#endif // __native_client__
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
-#include "ppapi/c/pp_resource.h"
-
-class CompletionCallbackRpcServer {
- public:
- static void RunCompletionCallback(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- int32_t callback_id,
- int32_t result,
- nacl_abi_size_t read_buffer_bytes, char* read_buffer);
-
- private:
- CompletionCallbackRpcServer();
- CompletionCallbackRpcServer(const CompletionCallbackRpcServer&);
- void operator=(const CompletionCallbackRpcServer);
-}; // class CompletionCallbackRpcServer
-
-class PppRpcServer {
- public:
- static void PPP_InitializeModule(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- int32_t pid,
- PP_Module module,
- NaClSrpcImcDescType upcall_channel_desc,
- char* service_description,
- int32_t* nacl_pid,
- int32_t* success);
- static void PPP_ShutdownModule(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done);
- static void PPP_GetInterface(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- char* interface_name,
- int32_t* exports_interface_name);
-
- private:
- PppRpcServer();
- PppRpcServer(const PppRpcServer&);
- void operator=(const PppRpcServer);
-}; // class PppRpcServer
-
-class PppAudioRpcServer {
- public:
- static void PPP_Audio_StreamCreated(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- NaClSrpcImcDescType out_shm,
- int32_t out_shm_size,
- NaClSrpcImcDescType out_socket);
-
- private:
- PppAudioRpcServer();
- PppAudioRpcServer(const PppAudioRpcServer&);
- void operator=(const PppAudioRpcServer);
-}; // class PppAudioRpcServer
-
-class PppFindRpcServer {
- public:
- static void PPP_Find_StartFind(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- nacl_abi_size_t text_bytes, char* text,
- int32_t case_sensitive,
- int32_t* supports_find);
- static void PPP_Find_SelectFindResult(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- int32_t forward);
- static void PPP_Find_StopFind(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance);
-
- private:
- PppFindRpcServer();
- PppFindRpcServer(const PppFindRpcServer&);
- void operator=(const PppFindRpcServer);
-}; // class PppFindRpcServer
-
-class PppInputEventRpcServer {
- public:
- static void PPP_InputEvent_HandleInputEvent(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t event_data_bytes, char* event_data,
- nacl_abi_size_t character_text_bytes, char* character_text,
- int32_t* handled);
-
- private:
- PppInputEventRpcServer();
- PppInputEventRpcServer(const PppInputEventRpcServer&);
- void operator=(const PppInputEventRpcServer);
-}; // class PppInputEventRpcServer
-
-class PppInstanceRpcServer {
- public:
- static void PPP_Instance_DidCreate(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- int32_t argc,
- nacl_abi_size_t argn_bytes, char* argn,
- nacl_abi_size_t argv_bytes, char* argv,
- int32_t* success);
- static void PPP_Instance_DidDestroy(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance);
- static void PPP_Instance_DidChangeView(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource resource,
- nacl_abi_size_t view_data_bytes, char* view_data);
- static void PPP_Instance_DidChangeFocus(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- bool has_focus);
- static void PPP_Instance_HandleDocumentLoad(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource url_loader,
- int32_t* success);
-
- private:
- PppInstanceRpcServer();
- PppInstanceRpcServer(const PppInstanceRpcServer&);
- void operator=(const PppInstanceRpcServer);
-}; // class PppInstanceRpcServer
-
-class PppMessagingRpcServer {
- public:
- static void PPP_Messaging_HandleMessage(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- nacl_abi_size_t message_bytes, char* message);
-
- private:
- PppMessagingRpcServer();
- PppMessagingRpcServer(const PppMessagingRpcServer&);
- void operator=(const PppMessagingRpcServer);
-}; // class PppMessagingRpcServer
-
-class PppMouseLockRpcServer {
- public:
- static void PPP_MouseLock_MouseLockLost(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance);
-
- private:
- PppMouseLockRpcServer();
- PppMouseLockRpcServer(const PppMouseLockRpcServer&);
- void operator=(const PppMouseLockRpcServer);
-}; // class PppMouseLockRpcServer
-
-class PppPrintingRpcServer {
- public:
- static void PPP_Printing_QuerySupportedFormats(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- int32_t* formats);
- static void PPP_Printing_Begin(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- nacl_abi_size_t print_settings_bytes, char* print_settings,
- int32_t* pages_required);
- static void PPP_Printing_PrintPages(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- nacl_abi_size_t page_ranges_bytes, char* page_ranges,
- int32_t page_range_count,
- PP_Resource* image_data);
- static void PPP_Printing_End(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance);
- static void PPP_Printing_IsScalingDisabled(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- int32_t* result);
-
- private:
- PppPrintingRpcServer();
- PppPrintingRpcServer(const PppPrintingRpcServer&);
- void operator=(const PppPrintingRpcServer);
-}; // class PppPrintingRpcServer
-
-class PppScrollbarRpcServer {
- public:
- static void PPP_Scrollbar_ValueChanged(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t value);
- static void PPP_Scrollbar_OverlayChanged(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource scrollbar,
- int32_t overlay);
-
- private:
- PppScrollbarRpcServer();
- PppScrollbarRpcServer(const PppScrollbarRpcServer&);
- void operator=(const PppScrollbarRpcServer);
-}; // class PppScrollbarRpcServer
-
-class PppSelectionRpcServer {
- public:
- static void PPP_Selection_GetSelectedText(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- int32_t html,
- nacl_abi_size_t* selected_text_bytes, char* selected_text);
-
- private:
- PppSelectionRpcServer();
- PppSelectionRpcServer(const PppSelectionRpcServer&);
- void operator=(const PppSelectionRpcServer);
-}; // class PppSelectionRpcServer
-
-class PppWidgetRpcServer {
- public:
- static void PPP_Widget_Invalidate(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- PP_Resource widget,
- nacl_abi_size_t dirty_rect_bytes, char* dirty_rect);
-
- private:
- PppWidgetRpcServer();
- PppWidgetRpcServer(const PppWidgetRpcServer&);
- void operator=(const PppWidgetRpcServer);
-}; // class PppWidgetRpcServer
-
-class PppZoomRpcServer {
- public:
- static void PPP_Zoom_Zoom(
- NaClSrpcRpc* rpc,
- NaClSrpcClosure* done,
- PP_Instance instance,
- double factor,
- int32_t text_only);
-
- private:
- PppZoomRpcServer();
- PppZoomRpcServer(const PppZoomRpcServer&);
- void operator=(const PppZoomRpcServer);
-}; // class PppZoomRpcServer
-
-class PppRpcs {
- public:
- static NaClSrpcHandlerDesc srpc_methods[];
-}; // class PppRpcs
-
-
-#endif // GEN_PPAPI_PROXY_PPP_RPC_H_
-
+// 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.
+//
+// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+//
+// Automatically generated code. See srpcgen.py
+//
+// NaCl Simple Remote Procedure Call interface abstractions.
+
+#ifndef GEN_PPAPI_PROXY_PPP_RPC_H_
+#define GEN_PPAPI_PROXY_PPP_RPC_H_
+
+#ifndef __native_client__
+#include "native_client/src/include/portability.h"
+#endif // __native_client__
+#include "native_client/src/shared/srpc/nacl_srpc.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/c/pp_resource.h"
+
+class CompletionCallbackRpcServer {
+ public:
+ static void RunCompletionCallback(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ int32_t callback_id,
+ int32_t result,
+ nacl_abi_size_t read_buffer_bytes, char* read_buffer);
+
+ private:
+ CompletionCallbackRpcServer();
+ CompletionCallbackRpcServer(const CompletionCallbackRpcServer&);
+ void operator=(const CompletionCallbackRpcServer);
+}; // class CompletionCallbackRpcServer
+
+class PppRpcServer {
+ public:
+ static void PPP_InitializeModule(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ int32_t pid,
+ PP_Module module,
+ NaClSrpcImcDescType upcall_channel_desc,
+ char* service_description,
+ int32_t* nacl_pid,
+ int32_t* success);
+ static void PPP_ShutdownModule(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done);
+ static void PPP_GetInterface(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ char* interface_name,
+ int32_t* exports_interface_name);
+
+ private:
+ PppRpcServer();
+ PppRpcServer(const PppRpcServer&);
+ void operator=(const PppRpcServer);
+}; // class PppRpcServer
+
+class PppAudioRpcServer {
+ public:
+ static void PPP_Audio_StreamCreated(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ NaClSrpcImcDescType out_shm,
+ int32_t out_shm_size,
+ NaClSrpcImcDescType out_socket);
+
+ private:
+ PppAudioRpcServer();
+ PppAudioRpcServer(const PppAudioRpcServer&);
+ void operator=(const PppAudioRpcServer);
+}; // class PppAudioRpcServer
+
+class PppFindRpcServer {
+ public:
+ static void PPP_Find_StartFind(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ nacl_abi_size_t text_bytes, char* text,
+ int32_t case_sensitive,
+ int32_t* supports_find);
+ static void PPP_Find_SelectFindResult(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ int32_t forward);
+ static void PPP_Find_StopFind(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance);
+
+ private:
+ PppFindRpcServer();
+ PppFindRpcServer(const PppFindRpcServer&);
+ void operator=(const PppFindRpcServer);
+}; // class PppFindRpcServer
+
+class PppInputEventRpcServer {
+ public:
+ static void PPP_InputEvent_HandleInputEvent(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t event_data_bytes, char* event_data,
+ nacl_abi_size_t character_text_bytes, char* character_text,
+ int32_t* handled);
+
+ private:
+ PppInputEventRpcServer();
+ PppInputEventRpcServer(const PppInputEventRpcServer&);
+ void operator=(const PppInputEventRpcServer);
+}; // class PppInputEventRpcServer
+
+class PppInstanceRpcServer {
+ public:
+ static void PPP_Instance_DidCreate(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ int32_t argc,
+ nacl_abi_size_t argn_bytes, char* argn,
+ nacl_abi_size_t argv_bytes, char* argv,
+ int32_t* success);
+ static void PPP_Instance_DidDestroy(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance);
+ static void PPP_Instance_DidChangeView(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource resource,
+ nacl_abi_size_t view_data_bytes, char* view_data);
+ static void PPP_Instance_DidChangeFocus(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ bool has_focus);
+ static void PPP_Instance_HandleDocumentLoad(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource url_loader,
+ int32_t* success);
+
+ private:
+ PppInstanceRpcServer();
+ PppInstanceRpcServer(const PppInstanceRpcServer&);
+ void operator=(const PppInstanceRpcServer);
+}; // class PppInstanceRpcServer
+
+class PppMessagingRpcServer {
+ public:
+ static void PPP_Messaging_HandleMessage(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ nacl_abi_size_t message_bytes, char* message);
+
+ private:
+ PppMessagingRpcServer();
+ PppMessagingRpcServer(const PppMessagingRpcServer&);
+ void operator=(const PppMessagingRpcServer);
+}; // class PppMessagingRpcServer
+
+class PppMouseLockRpcServer {
+ public:
+ static void PPP_MouseLock_MouseLockLost(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance);
+
+ private:
+ PppMouseLockRpcServer();
+ PppMouseLockRpcServer(const PppMouseLockRpcServer&);
+ void operator=(const PppMouseLockRpcServer);
+}; // class PppMouseLockRpcServer
+
+class PppPrintingRpcServer {
+ public:
+ static void PPP_Printing_QuerySupportedFormats(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ int32_t* formats);
+ static void PPP_Printing_Begin(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ nacl_abi_size_t print_settings_bytes, char* print_settings,
+ int32_t* pages_required);
+ static void PPP_Printing_PrintPages(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ nacl_abi_size_t page_ranges_bytes, char* page_ranges,
+ int32_t page_range_count,
+ PP_Resource* image_data);
+ static void PPP_Printing_End(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance);
+ static void PPP_Printing_IsScalingDisabled(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ int32_t* result);
+
+ private:
+ PppPrintingRpcServer();
+ PppPrintingRpcServer(const PppPrintingRpcServer&);
+ void operator=(const PppPrintingRpcServer);
+}; // class PppPrintingRpcServer
+
+class PppScrollbarRpcServer {
+ public:
+ static void PPP_Scrollbar_ValueChanged(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t value);
+ static void PPP_Scrollbar_OverlayChanged(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource scrollbar,
+ int32_t overlay);
+
+ private:
+ PppScrollbarRpcServer();
+ PppScrollbarRpcServer(const PppScrollbarRpcServer&);
+ void operator=(const PppScrollbarRpcServer);
+}; // class PppScrollbarRpcServer
+
+class PppSelectionRpcServer {
+ public:
+ static void PPP_Selection_GetSelectedText(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ int32_t html,
+ nacl_abi_size_t* selected_text_bytes, char* selected_text);
+
+ private:
+ PppSelectionRpcServer();
+ PppSelectionRpcServer(const PppSelectionRpcServer&);
+ void operator=(const PppSelectionRpcServer);
+}; // class PppSelectionRpcServer
+
+class PppWidgetRpcServer {
+ public:
+ static void PPP_Widget_Invalidate(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ PP_Resource widget,
+ nacl_abi_size_t dirty_rect_bytes, char* dirty_rect);
+
+ private:
+ PppWidgetRpcServer();
+ PppWidgetRpcServer(const PppWidgetRpcServer&);
+ void operator=(const PppWidgetRpcServer);
+}; // class PppWidgetRpcServer
+
+class PppZoomRpcServer {
+ public:
+ static void PPP_Zoom_Zoom(
+ NaClSrpcRpc* rpc,
+ NaClSrpcClosure* done,
+ PP_Instance instance,
+ double factor,
+ int32_t text_only);
+
+ private:
+ PppZoomRpcServer();
+ PppZoomRpcServer(const PppZoomRpcServer&);
+ void operator=(const PppZoomRpcServer);
+}; // class PppZoomRpcServer
+
+class PppRpcs {
+ public:
+ static NaClSrpcHandlerDesc srpc_methods[];
+}; // class PppRpcs
+
+
+#endif // GEN_PPAPI_PROXY_PPP_RPC_H_
+
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/view_data.cc b/ppapi/native_client/src/shared/ppapi_proxy/view_data.cc
index 40abea3..60174f5 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/view_data.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/view_data.cc
@@ -1,16 +1,16 @@
-// 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/native_client/src/shared/ppapi_proxy/view_data.h"
-
-namespace ppapi_proxy {
-
-ViewData::ViewData()
- : viewport_rect(PP_MakeRectFromXYWH(0, 0, 0, 0)),
- is_fullscreen(PP_FALSE),
- is_page_visible(PP_FALSE),
- clip_rect(PP_MakeRectFromXYWH(0, 0, 0, 0)) {
-}
-
-} // namespace ppapi_proxy
+// 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/native_client/src/shared/ppapi_proxy/view_data.h"
+
+namespace ppapi_proxy {
+
+ViewData::ViewData()
+ : viewport_rect(PP_MakeRectFromXYWH(0, 0, 0, 0)),
+ is_fullscreen(PP_FALSE),
+ is_page_visible(PP_FALSE),
+ clip_rect(PP_MakeRectFromXYWH(0, 0, 0, 0)) {
+}
+
+} // namespace ppapi_proxy
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/view_data.h b/ppapi/native_client/src/shared/ppapi_proxy/view_data.h
index 82446e0..29d8985 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/view_data.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/view_data.h
@@ -1,24 +1,24 @@
-// 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_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
-#define PPAPI_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_rect.h"
-
-namespace ppapi_proxy {
-
-struct ViewData {
- ViewData();
-
- PP_Rect viewport_rect;
- PP_Bool is_fullscreen;
- PP_Bool is_page_visible;
- PP_Rect clip_rect;
-};
-
-} // namespace ppapi_proxy
-
-#endif // PPAPI_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
+// 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_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
+#define PPAPI_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_rect.h"
+
+namespace ppapi_proxy {
+
+struct ViewData {
+ ViewData();
+
+ PP_Rect viewport_rect;
+ PP_Bool is_fullscreen;
+ PP_Bool is_page_visible;
+ PP_Rect clip_rect;
+};
+
+} // namespace ppapi_proxy
+
+#endif // PPAPI_NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_VIEW_DATA_H_
diff --git a/ppapi/shared_impl/ppb_view_shared.cc b/ppapi/shared_impl/ppb_view_shared.cc
index 30030d4..8b2f339 100644
--- a/ppapi/shared_impl/ppb_view_shared.cc
+++ b/ppapi/shared_impl/ppb_view_shared.cc
@@ -1,55 +1,55 @@
-// 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/shared_impl/ppb_view_shared.h"
-
-namespace ppapi {
-
-ViewData::ViewData() {
- // Assume POD.
- memset(this, 0, sizeof(ViewData));
-}
-
-ViewData::~ViewData() {
-}
-
-bool ViewData::Equals(const ViewData& other) const {
- return rect.point.x == other.rect.point.x &&
- rect.point.y == other.rect.point.y &&
- rect.size.width == other.rect.size.width &&
- rect.size.height == other.rect.size.height &&
- is_fullscreen == other.is_fullscreen &&
- is_page_visible == other.is_page_visible &&
- clip_rect.point.x == other.clip_rect.point.x &&
- clip_rect.point.y == other.clip_rect.point.y &&
- clip_rect.size.width == other.clip_rect.size.width &&
- clip_rect.size.height == other.clip_rect.size.height;
-}
-
-PPB_View_Shared::PPB_View_Shared(const InitAsImpl&,
- PP_Instance instance,
- const ViewData& data)
- : Resource(instance),
- data_(data) {
-}
-
-PPB_View_Shared::PPB_View_Shared(const InitAsProxy&,
- PP_Instance instance,
- const ViewData& data)
- : Resource(HostResource::MakeInstanceOnly(instance)),
- data_(data) {
-}
-
-PPB_View_Shared::~PPB_View_Shared() {
-}
-
-thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() {
- return this;
-}
-
-const ViewData& PPB_View_Shared::GetData() const {
- return data_;
-}
-
-} // namespace ppapi
+// 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/shared_impl/ppb_view_shared.h"
+
+namespace ppapi {
+
+ViewData::ViewData() {
+ // Assume POD.
+ memset(this, 0, sizeof(ViewData));
+}
+
+ViewData::~ViewData() {
+}
+
+bool ViewData::Equals(const ViewData& other) const {
+ return rect.point.x == other.rect.point.x &&
+ rect.point.y == other.rect.point.y &&
+ rect.size.width == other.rect.size.width &&
+ rect.size.height == other.rect.size.height &&
+ is_fullscreen == other.is_fullscreen &&
+ is_page_visible == other.is_page_visible &&
+ clip_rect.point.x == other.clip_rect.point.x &&
+ clip_rect.point.y == other.clip_rect.point.y &&
+ clip_rect.size.width == other.clip_rect.size.width &&
+ clip_rect.size.height == other.clip_rect.size.height;
+}
+
+PPB_View_Shared::PPB_View_Shared(const InitAsImpl&,
+ PP_Instance instance,
+ const ViewData& data)
+ : Resource(instance),
+ data_(data) {
+}
+
+PPB_View_Shared::PPB_View_Shared(const InitAsProxy&,
+ PP_Instance instance,
+ const ViewData& data)
+ : Resource(HostResource::MakeInstanceOnly(instance)),
+ data_(data) {
+}
+
+PPB_View_Shared::~PPB_View_Shared() {
+}
+
+thunk::PPB_View_API* PPB_View_Shared::AsPPB_View_API() {
+ return this;
+}
+
+const ViewData& PPB_View_Shared::GetData() const {
+ return data_;
+}
+
+} // namespace ppapi
diff --git a/ppapi/shared_impl/ppb_view_shared.h b/ppapi/shared_impl/ppb_view_shared.h
index 6bba605..ecfb1a0 100644
--- a/ppapi/shared_impl/ppb_view_shared.h
+++ b/ppapi/shared_impl/ppb_view_shared.h
@@ -1,61 +1,61 @@
-// 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_SHARED_IMPL_PPB_VIEW_SHARED_H_
-#define PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
-
-#include "base/compiler_specific.h"
-#include "ppapi/c/pp_rect.h"
-#include "ppapi/c/pp_size.h"
-#include "ppapi/shared_impl/resource.h"
-#include "ppapi/thunk/ppb_view_api.h"
-
-namespace ppapi {
-
-// If you add to this struct, be sure to update the serialization in
-// ppapi_messages.h.
-struct PPAPI_SHARED_EXPORT ViewData {
- ViewData();
- ~ViewData();
-
- bool Equals(const ViewData& other) const;
-
- PP_Rect rect;
- bool is_fullscreen;
- bool is_page_visible;
- PP_Rect clip_rect;
-};
-
-class PPAPI_SHARED_EXPORT PPB_View_Shared
- : public Resource,
- public thunk::PPB_View_API {
- public:
- struct InitAsImpl {};
- struct InitAsProxy {};
-
- // The dummy arguments control which version of Resource's constructor is
- // called for this base class.
- PPB_View_Shared(const InitAsImpl&,
- PP_Instance instance,
- const ViewData& data);
- PPB_View_Shared(const InitAsProxy&,
- PP_Instance instance,
- const ViewData& data);
- virtual ~PPB_View_Shared();
-
- // Resource overrides.
- virtual thunk::PPB_View_API* AsPPB_View_API() OVERRIDE;
-
- // PPB_View_API implementation.
- virtual const ViewData& GetData() const OVERRIDE;
-
- private:
- ViewData data_;
-
- DISALLOW_COPY_AND_ASSIGN(PPB_View_Shared);
-};
-
-} // namespace ppapi
-
-#endif // PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
+// 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_SHARED_IMPL_PPB_VIEW_SHARED_H_
+#define PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
+
+#include "base/compiler_specific.h"
+#include "ppapi/c/pp_rect.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/shared_impl/resource.h"
+#include "ppapi/thunk/ppb_view_api.h"
+
+namespace ppapi {
+
+// If you add to this struct, be sure to update the serialization in
+// ppapi_messages.h.
+struct PPAPI_SHARED_EXPORT ViewData {
+ ViewData();
+ ~ViewData();
+
+ bool Equals(const ViewData& other) const;
+
+ PP_Rect rect;
+ bool is_fullscreen;
+ bool is_page_visible;
+ PP_Rect clip_rect;
+};
+
+class PPAPI_SHARED_EXPORT PPB_View_Shared
+ : public Resource,
+ public thunk::PPB_View_API {
+ public:
+ struct InitAsImpl {};
+ struct InitAsProxy {};
+
+ // The dummy arguments control which version of Resource's constructor is
+ // called for this base class.
+ PPB_View_Shared(const InitAsImpl&,
+ PP_Instance instance,
+ const ViewData& data);
+ PPB_View_Shared(const InitAsProxy&,
+ PP_Instance instance,
+ const ViewData& data);
+ virtual ~PPB_View_Shared();
+
+ // Resource overrides.
+ virtual thunk::PPB_View_API* AsPPB_View_API() OVERRIDE;
+
+ // PPB_View_API implementation.
+ virtual const ViewData& GetData() const OVERRIDE;
+
+ private:
+ ViewData data_;
+
+ DISALLOW_COPY_AND_ASSIGN(PPB_View_Shared);
+};
+
+} // namespace ppapi
+
+#endif // PPAPI_SHARED_IMPL_PPB_VIEW_SHARED_H_
diff --git a/ppapi/shared_impl/ppp_instance_combined.cc b/ppapi/shared_impl/ppp_instance_combined.cc
index ebadcd1f..d27c2a0 100644
--- a/ppapi/shared_impl/ppp_instance_combined.cc
+++ b/ppapi/shared_impl/ppp_instance_combined.cc
@@ -1,57 +1,57 @@
-// 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/shared_impl/ppp_instance_combined.h"
-
-namespace ppapi {
-
-PPP_Instance_Combined::PPP_Instance_Combined(
- const PPP_Instance_1_0& instance_if)
- : did_change_view_1_0_(instance_if.DidChangeView) {
- instance_1_1_.DidCreate = instance_if.DidCreate;
- instance_1_1_.DidDestroy = instance_if.DidDestroy;
- instance_1_1_.DidChangeView = NULL;
- instance_1_1_.DidChangeFocus = instance_if.DidChangeFocus;
- instance_1_1_.HandleDocumentLoad = instance_if.HandleDocumentLoad;
-}
-
-PPP_Instance_Combined::PPP_Instance_Combined(
- const PPP_Instance_1_1& instance_if)
- : instance_1_1_(instance_if),
- did_change_view_1_0_(NULL) {
-}
-
-PP_Bool PPP_Instance_Combined::DidCreate(PP_Instance instance,
- uint32_t argc,
- const char* argn[],
- const char* argv[]) {
- return instance_1_1_.DidCreate(instance, argc, argn, argv);
-}
-
-void PPP_Instance_Combined::DidDestroy(PP_Instance instance) {
- return instance_1_1_.DidDestroy(instance);
-}
-
-void PPP_Instance_Combined::DidChangeView(PP_Instance instance,
- PP_Resource view_changed_resource,
- const struct PP_Rect* position,
- const struct PP_Rect* clip) {
- if (instance_1_1_.DidChangeView)
- instance_1_1_.DidChangeView(instance, view_changed_resource);
- else
- did_change_view_1_0_(instance, position, clip);
-}
-
-void PPP_Instance_Combined::DidChangeFocus(PP_Instance instance,
- PP_Bool has_focus) {
- instance_1_1_.DidChangeFocus(instance, has_focus);
-}
-
-PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance,
- PP_Resource url_loader) {
- return instance_1_1_.HandleDocumentLoad(instance, url_loader);
-}
-
-} // namespace ppapi
-
+// 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/shared_impl/ppp_instance_combined.h"
+
+namespace ppapi {
+
+PPP_Instance_Combined::PPP_Instance_Combined(
+ const PPP_Instance_1_0& instance_if)
+ : did_change_view_1_0_(instance_if.DidChangeView) {
+ instance_1_1_.DidCreate = instance_if.DidCreate;
+ instance_1_1_.DidDestroy = instance_if.DidDestroy;
+ instance_1_1_.DidChangeView = NULL;
+ instance_1_1_.DidChangeFocus = instance_if.DidChangeFocus;
+ instance_1_1_.HandleDocumentLoad = instance_if.HandleDocumentLoad;
+}
+
+PPP_Instance_Combined::PPP_Instance_Combined(
+ const PPP_Instance_1_1& instance_if)
+ : instance_1_1_(instance_if),
+ did_change_view_1_0_(NULL) {
+}
+
+PP_Bool PPP_Instance_Combined::DidCreate(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]) {
+ return instance_1_1_.DidCreate(instance, argc, argn, argv);
+}
+
+void PPP_Instance_Combined::DidDestroy(PP_Instance instance) {
+ return instance_1_1_.DidDestroy(instance);
+}
+
+void PPP_Instance_Combined::DidChangeView(PP_Instance instance,
+ PP_Resource view_changed_resource,
+ const struct PP_Rect* position,
+ const struct PP_Rect* clip) {
+ if (instance_1_1_.DidChangeView)
+ instance_1_1_.DidChangeView(instance, view_changed_resource);
+ else
+ did_change_view_1_0_(instance, position, clip);
+}
+
+void PPP_Instance_Combined::DidChangeFocus(PP_Instance instance,
+ PP_Bool has_focus) {
+ instance_1_1_.DidChangeFocus(instance, has_focus);
+}
+
+PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance,
+ PP_Resource url_loader) {
+ return instance_1_1_.HandleDocumentLoad(instance, url_loader);
+}
+
+} // namespace ppapi
+
diff --git a/ppapi/thunk/ppb_view_api.h b/ppapi/thunk/ppb_view_api.h
index 377658a..50e256e 100644
--- a/ppapi/thunk/ppb_view_api.h
+++ b/ppapi/thunk/ppb_view_api.h
@@ -1,31 +1,31 @@
-// 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_VIEW_API_H_
-#define PPAPI_THUNK_PPB_VIEW_API_H_
-
-#include "ppapi/thunk/ppapi_thunk_export.h"
-
-namespace ppapi {
-
-struct ViewData;
-
-namespace thunk {
-
-class PPAPI_THUNK_EXPORT PPB_View_API {
- public:
- virtual ~PPB_View_API() {}
-
- // Returns the view data struct. We could have virtual functions here for
- // each PPAPI function, but that would be more boilerplate for these simple
- // getters so the logic is implemented in the thunk layer. If we start
- // autogenerating the thunk layer and need this to be more regular, adding
- // the API functions here should be fine.
- virtual const ViewData& GetData() const = 0;
-};
-
-} // namespace thunk
-} // namespace ppapi
-
-#endif // PPAPI_THUNK_PPB_VIEW_API_H_
+// 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_VIEW_API_H_
+#define PPAPI_THUNK_PPB_VIEW_API_H_
+
+#include "ppapi/thunk/ppapi_thunk_export.h"
+
+namespace ppapi {
+
+struct ViewData;
+
+namespace thunk {
+
+class PPAPI_THUNK_EXPORT PPB_View_API {
+ public:
+ virtual ~PPB_View_API() {}
+
+ // Returns the view data struct. We could have virtual functions here for
+ // each PPAPI function, but that would be more boilerplate for these simple
+ // getters so the logic is implemented in the thunk layer. If we start
+ // autogenerating the thunk layer and need this to be more regular, adding
+ // the API functions here should be fine.
+ virtual const ViewData& GetData() const = 0;
+};
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_PPB_VIEW_API_H_
diff --git a/ppapi/thunk/ppb_view_thunk.cc b/ppapi/thunk/ppb_view_thunk.cc
index 2615fea..04246c5 100644
--- a/ppapi/thunk/ppb_view_thunk.cc
+++ b/ppapi/thunk/ppb_view_thunk.cc
@@ -1,96 +1,96 @@
-// 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/c/ppb_view.h"
-#include "ppapi/shared_impl/ppb_view_shared.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_view_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-typedef EnterResource<PPB_View_API> EnterView;
-
-bool IsRectVisible(const PP_Rect& rect) {
- return rect.size.width > 0 && rect.size.height > 0;
-}
-
-PP_Bool IsView(PP_Resource resource) {
- EnterView enter(resource, false);
- return enter.succeeded() ? PP_TRUE : PP_FALSE;
-}
-
-PP_Bool GetSize(PP_Resource resource, PP_Size* size) {
- EnterView enter(resource, true);
- if (enter.failed() || !size)
- return PP_FALSE;
- *size = enter.object()->GetData().rect.size;
- return PP_TRUE;
-}
-
-PP_Bool GetRect(PP_Resource resource, PP_Rect* viewport) {
- EnterView enter(resource, true);
- if (enter.failed() || !viewport)
- return PP_FALSE;
- *viewport = enter.object()->GetData().rect;
- return PP_TRUE;
-}
-
-PP_Bool IsFullscreen(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_fullscreen);
-}
-
-PP_Bool IsUserVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_page_visible &&
- IsRectVisible(enter.object()->GetData().clip_rect));
-}
-
-PP_Bool IsPageVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->GetData().is_page_visible);
-}
-
-PP_Bool IsClipVisible(PP_Resource resource) {
- EnterView enter(resource, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(IsRectVisible(enter.object()->GetData().clip_rect));
-}
-
-PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) {
- EnterView enter(resource, true);
- if (enter.failed() || !clip)
- return PP_FALSE;
- *clip = enter.object()->GetData().clip_rect;
- return PP_TRUE;
-}
-
-const PPB_View g_ppb_view_thunk = {
- &IsView,
- &GetRect,
- &IsFullscreen,
- &IsUserVisible,
- &IsPageVisible,
- &GetClipRect
-};
-
-} // namespace
-
-const PPB_View* GetPPB_View_Thunk() {
- return &g_ppb_view_thunk;
-}
-
-} // namespace thunk
-} // namespace ppapi
+// 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/c/ppb_view.h"
+#include "ppapi/shared_impl/ppb_view_shared.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_view_api.h"
+#include "ppapi/thunk/thunk.h"
+
+namespace ppapi {
+namespace thunk {
+
+namespace {
+
+typedef EnterResource<PPB_View_API> EnterView;
+
+bool IsRectVisible(const PP_Rect& rect) {
+ return rect.size.width > 0 && rect.size.height > 0;
+}
+
+PP_Bool IsView(PP_Resource resource) {
+ EnterView enter(resource, false);
+ return enter.succeeded() ? PP_TRUE : PP_FALSE;
+}
+
+PP_Bool GetSize(PP_Resource resource, PP_Size* size) {
+ EnterView enter(resource, true);
+ if (enter.failed() || !size)
+ return PP_FALSE;
+ *size = enter.object()->GetData().rect.size;
+ return PP_TRUE;
+}
+
+PP_Bool GetRect(PP_Resource resource, PP_Rect* viewport) {
+ EnterView enter(resource, true);
+ if (enter.failed() || !viewport)
+ return PP_FALSE;
+ *viewport = enter.object()->GetData().rect;
+ return PP_TRUE;
+}
+
+PP_Bool IsFullscreen(PP_Resource resource) {
+ EnterView enter(resource, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return PP_FromBool(enter.object()->GetData().is_fullscreen);
+}
+
+PP_Bool IsUserVisible(PP_Resource resource) {
+ EnterView enter(resource, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return PP_FromBool(enter.object()->GetData().is_page_visible &&
+ IsRectVisible(enter.object()->GetData().clip_rect));
+}
+
+PP_Bool IsPageVisible(PP_Resource resource) {
+ EnterView enter(resource, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return PP_FromBool(enter.object()->GetData().is_page_visible);
+}
+
+PP_Bool IsClipVisible(PP_Resource resource) {
+ EnterView enter(resource, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return PP_FromBool(IsRectVisible(enter.object()->GetData().clip_rect));
+}
+
+PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) {
+ EnterView enter(resource, true);
+ if (enter.failed() || !clip)
+ return PP_FALSE;
+ *clip = enter.object()->GetData().clip_rect;
+ return PP_TRUE;
+}
+
+const PPB_View g_ppb_view_thunk = {
+ &IsView,
+ &GetRect,
+ &IsFullscreen,
+ &IsUserVisible,
+ &IsPageVisible,
+ &GetClipRect
+};
+
+} // namespace
+
+const PPB_View* GetPPB_View_Thunk() {
+ return &g_ppb_view_thunk;
+}
+
+} // namespace thunk
+} // namespace ppapi