summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 21:58:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 21:58:02 +0000
commit4d2efd2e100bc961d3e19e0a6f242c7914917690 (patch)
treec29e1a627687c0ef29a207378ff19fcd9927fb67 /ppapi/thunk
parent6fa9e6f0c0fd3a66789de9df381cc16c36ca6da1 (diff)
downloadchromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.zip
chromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.tar.gz
chromium_src-4d2efd2e100bc961d3e19e0a6f242c7914917690.tar.bz2
Convert the pp::proxy namespace to the ppapi::proxy namespace.
This is more consistent with the stuff in shared_impl, and removes a lot of namespace using goop. Add a unified resource tracker shared between the proxy and the impl. This renames the old ResourceObjectBase to Resource and removes the old PluginResource. It moves the resource tracker from the impl to the shared_impl, and makes the proxy use it. Some things become a little less neat because there's no proxy resource base class. In particular GetDispatcher() is now gone. I considered whether to add a helper base class that provides this function, but decided against it and had individual resource classes implement this when their implementation would find it useful. This is because ultimately I want more of this functionality to move into the shared_impl, and it's easier to do that if there are fewer proxy-specific things in the resources. This changes the way that plugins are added to the tracker. Previously they would only be in the tracker if the plugin had a reference to them, although they could be alive if the impl had a scoped_ptr referencing an object. This actually has the bug that if we then give the resource back to the plugin, it wouldn't be refcounted properly and everything would get confused. Now the tracker tracks all live resource objects whether or not the plugin has a ref. This works basically like the var tracker (it would be nice if the var and resource trackers shared more code, but that would further complicate this already overcomplicated patch). The resource tracker takes an extra ref whenever the plugin has one or more, and otherwise just tracks live resources. BUG= TEST= Review URL: http://codereview.chromium.org/7655002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/ppb_char_set_api.h4
-rw-r--r--ppapi/thunk/ppb_cursor_control_api.h4
-rw-r--r--ppapi/thunk/ppb_find_api.h3
-rw-r--r--ppapi/thunk/ppb_font_api.h3
-rw-r--r--ppapi/thunk/ppb_instance_api.h4
-rw-r--r--ppapi/thunk/resource_creation_api.h4
6 files changed, 10 insertions, 12 deletions
diff --git a/ppapi/thunk/ppb_char_set_api.h b/ppapi/thunk/ppb_char_set_api.h
index 7896a64..b3c4d8a 100644
--- a/ppapi/thunk/ppb_char_set_api.h
+++ b/ppapi/thunk/ppb_char_set_api.h
@@ -27,8 +27,8 @@ class PPB_CharSet_FunctionAPI {
uint32_t* output_length) = 0;
virtual PP_Var GetDefaultCharSet(PP_Instance instance) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_PPB_CHAR_SET;
+ static const proxy::InterfaceID interface_id =
+ proxy::INTERFACE_ID_PPB_CHAR_SET;
};
} // namespace thunk
diff --git a/ppapi/thunk/ppb_cursor_control_api.h b/ppapi/thunk/ppb_cursor_control_api.h
index a3be495..5cd37ea 100644
--- a/ppapi/thunk/ppb_cursor_control_api.h
+++ b/ppapi/thunk/ppb_cursor_control_api.h
@@ -24,8 +24,8 @@ class PPB_CursorControl_FunctionAPI {
virtual PP_Bool HasCursorLock(PP_Instance instance) = 0;
virtual PP_Bool CanLockCursor(PP_Instance instance) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_PPB_CURSORCONTROL;
+ static const proxy::InterfaceID interface_id =
+ proxy::INTERFACE_ID_PPB_CURSORCONTROL;
};
diff --git a/ppapi/thunk/ppb_find_api.h b/ppapi/thunk/ppb_find_api.h
index b8f615c..aacd77e 100644
--- a/ppapi/thunk/ppb_find_api.h
+++ b/ppapi/thunk/ppb_find_api.h
@@ -21,8 +21,7 @@ class PPB_Find_FunctionAPI {
virtual void SelectedFindResultChanged(PP_Instance instance,
int32_t index) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_PPB_FIND;
+ static const proxy::InterfaceID interface_id = proxy::INTERFACE_ID_PPB_FIND;
};
} // namespace thunk
diff --git a/ppapi/thunk/ppb_font_api.h b/ppapi/thunk/ppb_font_api.h
index 8237f2a..bd6a5e1 100644
--- a/ppapi/thunk/ppb_font_api.h
+++ b/ppapi/thunk/ppb_font_api.h
@@ -18,8 +18,7 @@ class PPB_Font_FunctionAPI {
virtual PP_Var GetFontFamilies(PP_Instance instance) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_PPB_FONT;
+ static const proxy::InterfaceID interface_id = proxy::INTERFACE_ID_PPB_FONT;
};
// API for font resources.
diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h
index 4b5e78d..dcf100dc 100644
--- a/ppapi/thunk/ppb_instance_api.h
+++ b/ppapi/thunk/ppb_instance_api.h
@@ -53,8 +53,8 @@ class PPB_Instance_FunctionAPI {
// QueryPolicy.
virtual void SubscribeToPolicyUpdates(PP_Instance instance) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_PPB_INSTANCE;
+ static const proxy::InterfaceID interface_id =
+ proxy::INTERFACE_ID_PPB_INSTANCE;
};
} // namespace thunk
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index c10d0af..589484d 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -123,8 +123,8 @@ class ResourceCreationAPI {
const PP_FloatPoint* wheel_ticks,
PP_Bool scroll_by_page) = 0;
- static const ::pp::proxy::InterfaceID interface_id =
- ::pp::proxy::INTERFACE_ID_RESOURCE_CREATION;
+ static const proxy::InterfaceID interface_id =
+ proxy::INTERFACE_ID_RESOURCE_CREATION;
};
} // namespace thunk