| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/proxy/interface_list.h" | 5 #include "ppapi/proxy/interface_list.h" |
| 6 | 6 |
| 7 #include "base/hash.h" | 7 #include "base/hash.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "ppapi/c/dev/ppb_alarms_dev.h" | 10 #include "ppapi/c/dev/ppb_alarms_dev.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 PERMISSION_NONE); | 232 PERMISSION_NONE); |
| 233 AddPPB(PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0, | 233 AddPPB(PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0, |
| 234 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface(), | 234 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface(), |
| 235 PERMISSION_NONE); | 235 PERMISSION_NONE); |
| 236 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0, | 236 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0, |
| 237 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface(), PERMISSION_NONE); | 237 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface(), PERMISSION_NONE); |
| 238 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0, | 238 AddPPB(PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0, |
| 239 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface(), PERMISSION_NONE); | 239 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface(), PERMISSION_NONE); |
| 240 AddPPB(PPB_OPENGLES2_QUERY_INTERFACE_1_0, | 240 AddPPB(PPB_OPENGLES2_QUERY_INTERFACE_1_0, |
| 241 PPB_OpenGLES2_Shared::GetQueryInterface(), PERMISSION_NONE); | 241 PPB_OpenGLES2_Shared::GetQueryInterface(), PERMISSION_NONE); |
| 242 AddPPB(PPB_OPENGLES2_DRAWBUFFERS_DEV_INTERFACE_1_0, |
| 243 PPB_OpenGLES2_Shared::GetDrawBuffersInterface(), |
| 244 PERMISSION_DEV); |
| 242 AddPPB(PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0, | 245 AddPPB(PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0, |
| 243 PPB_Var_Shared::GetVarArrayBufferInterface1_0(), PERMISSION_NONE); | 246 PPB_Var_Shared::GetVarArrayBufferInterface1_0(), |
| 247 PERMISSION_NONE); |
| 244 AddPPB(PPB_VAR_INTERFACE_1_2, | 248 AddPPB(PPB_VAR_INTERFACE_1_2, |
| 245 PPB_Var_Shared::GetVarInterface1_2(), PERMISSION_NONE); | 249 PPB_Var_Shared::GetVarInterface1_2(), PERMISSION_NONE); |
| 246 AddPPB(PPB_VAR_INTERFACE_1_1, | 250 AddPPB(PPB_VAR_INTERFACE_1_1, |
| 247 PPB_Var_Shared::GetVarInterface1_1(), PERMISSION_NONE); | 251 PPB_Var_Shared::GetVarInterface1_1(), PERMISSION_NONE); |
| 248 AddPPB(PPB_VAR_INTERFACE_1_0, | 252 AddPPB(PPB_VAR_INTERFACE_1_0, |
| 249 PPB_Var_Shared::GetVarInterface1_0(), PERMISSION_NONE); | 253 PPB_Var_Shared::GetVarInterface1_0(), PERMISSION_NONE); |
| 250 | 254 |
| 251 #if !defined(OS_NACL) | 255 #if !defined(OS_NACL) |
| 252 // PPB (browser) interfaces. | 256 // PPB (browser) interfaces. |
| 253 // Do not add more stuff here, they should be added to interface_list*.h | 257 // Do not add more stuff here, they should be added to interface_list*.h |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // static | 389 // static |
| 386 int InterfaceList::HashInterfaceName(const std::string& name) { | 390 int InterfaceList::HashInterfaceName(const std::string& name) { |
| 387 uint32 data = base::Hash(name.c_str(), name.size()); | 391 uint32 data = base::Hash(name.c_str(), name.size()); |
| 388 // Strip off the signed bit because UMA doesn't support negative values, | 392 // Strip off the signed bit because UMA doesn't support negative values, |
| 389 // but takes a signed int as input. | 393 // but takes a signed int as input. |
| 390 return static_cast<int>(data & 0x7fffffff); | 394 return static_cast<int>(data & 0x7fffffff); |
| 391 } | 395 } |
| 392 | 396 |
| 393 } // namespace proxy | 397 } // namespace proxy |
| 394 } // namespace ppapi | 398 } // namespace ppapi |
| OLD | NEW |