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

Unified Diff: ppapi/proxy/dispatcher.cc

Issue 7189045: Make o.o.p. proxy handle PPP_Instance versions 0.4 and 0.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make HostDispatcher remember plugin IFs by name, not ID Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/dispatcher.cc
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc
index dcc40cf09e4c4b8fb4444b5df3d89a470670d7f2..3a31a4832c54e1b18114e7b2fe43b1040ded054c 100644
--- a/ppapi/proxy/dispatcher.cc
+++ b/ppapi/proxy/dispatcher.cc
@@ -104,12 +104,10 @@ struct InterfaceList {
// we're converting to the thunk system, when that is complete, we need to
// have a better way of handling multiple interface implemented by one
// proxy object.
- const InterfaceProxy::Info* id_to_plugin_info_[INTERFACE_ID_COUNT];
const InterfaceProxy::Info* id_to_browser_info_[INTERFACE_ID_COUNT];
};
InterfaceList::InterfaceList() {
- memset(id_to_plugin_info_, 0, sizeof(id_to_plugin_info_));
memset(id_to_browser_info_, 0, sizeof(id_to_browser_info_));
// PPB (browser) interfaces.
@@ -158,18 +156,16 @@ InterfaceList::InterfaceList() {
// PPP (plugin) interfaces.
AddPPP(PPP_Graphics3D_Proxy::GetInfo());
AddPPP(PPP_Instance_Private_Proxy::GetInfo());
- AddPPP(PPP_Instance_Proxy::GetInfo());
+ AddPPP(PPP_Instance_Proxy::GetInfo0_4());
+ AddPPP(PPP_Instance_Proxy::GetInfo0_5());
}
void InterfaceList::AddPPP(const InterfaceProxy::Info* info) {
DCHECK(name_to_plugin_info_.find(info->name) ==
name_to_plugin_info_.end());
DCHECK(info->id >= INTERFACE_ID_NONE && info->id < INTERFACE_ID_COUNT);
- DCHECK(info->id == INTERFACE_ID_NONE || id_to_plugin_info_[info->id] == NULL);
name_to_plugin_info_[info->name] = info;
- if (info->id != INTERFACE_ID_NONE)
- id_to_plugin_info_[info->id] = info;
}
void InterfaceList::AddPPB(const InterfaceProxy::Info* info) {
@@ -246,14 +242,6 @@ const InterfaceProxy::Info* Dispatcher::GetPPPInterfaceInfo(
return found->second;
}
-// static
-const InterfaceProxy::Info* Dispatcher::GetPPPInterfaceInfo(InterfaceID id) {
- if (id <= 0 || id >= INTERFACE_ID_COUNT)
- return NULL;
- const InterfaceList* list = InterfaceList::GetInstance();
- return list->id_to_plugin_info_[id];
-}
-
void Dispatcher::SetSerializationRules(
VarSerializationRules* var_serialization_rules) {
serialization_rules_.reset(var_serialization_rules);

Powered by Google App Engine
This is Rietveld 408576698