| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/resource_tracker.h" |    5 #include "webkit/plugins/ppapi/resource_tracker.h" | 
|    6  |    6  | 
|    7 #include <limits> |    7 #include <limits> | 
|    8 #include <set> |    8 #include <set> | 
|    9  |    9  | 
|   10 #include "base/logging.h" |   10 #include "base/logging.h" | 
|   11 #include "base/rand_util.h" |   11 #include "base/rand_util.h" | 
|   12 #include "ppapi/c/pp_resource.h" |   12 #include "ppapi/c/pp_resource.h" | 
|   13 #include "ppapi/c/pp_var.h" |   13 #include "ppapi/c/pp_var.h" | 
|   14 #include "ppapi/shared_impl/function_group_base.h" |   14 #include "ppapi/shared_impl/function_group_base.h" | 
|   15 #include "ppapi/shared_impl/id_assignment.h" |   15 #include "ppapi/shared_impl/id_assignment.h" | 
|   16 #include "ppapi/shared_impl/tracker_base.h" |   16 #include "ppapi/shared_impl/tracker_base.h" | 
|   17 #include "webkit/plugins/ppapi/callbacks.h" |   17 #include "webkit/plugins/ppapi/callbacks.h" | 
|   18 #include "webkit/plugins/ppapi/npobject_var.h" |   18 #include "webkit/plugins/ppapi/npobject_var.h" | 
|   19 #include "webkit/plugins/ppapi/plugin_module.h" |   19 #include "webkit/plugins/ppapi/plugin_module.h" | 
|   20 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |   20 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 
|   21 #include "webkit/plugins/ppapi/ppb_char_set_impl.h" |   21 #include "webkit/plugins/ppapi/ppb_char_set_impl.h" | 
|   22 #include "webkit/plugins/ppapi/ppb_cursor_control_impl.h" |   22 #include "webkit/plugins/ppapi/ppb_cursor_control_impl.h" | 
|   23 #include "webkit/plugins/ppapi/ppb_find_impl.h" |   23 #include "webkit/plugins/ppapi/ppb_find_impl.h" | 
|   24 #include "webkit/plugins/ppapi/ppb_font_impl.h" |   24 #include "webkit/plugins/ppapi/ppb_font_impl.h" | 
 |   25 #include "webkit/plugins/ppapi/ppb_text_input_impl.h" | 
|   25 #include "webkit/plugins/ppapi/resource_creation_impl.h" |   26 #include "webkit/plugins/ppapi/resource_creation_impl.h" | 
|   26 #include "webkit/plugins/ppapi/resource_helper.h" |   27 #include "webkit/plugins/ppapi/resource_helper.h" | 
|   27  |   28  | 
|   28 using ppapi::CheckIdType; |   29 using ppapi::CheckIdType; | 
|   29 using ppapi::MakeTypedId; |   30 using ppapi::MakeTypedId; | 
|   30 using ppapi::NPObjectVar; |   31 using ppapi::NPObjectVar; | 
|   31 using ppapi::PPIdType; |   32 using ppapi::PPIdType; | 
|   32 using ppapi::Var; |   33 using ppapi::Var; | 
|   33  |   34  | 
|   34 namespace webkit { |   35 namespace webkit { | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  141       break; |  142       break; | 
|  142     case ::ppapi::proxy::INTERFACE_ID_PPB_CURSORCONTROL: |  143     case ::ppapi::proxy::INTERFACE_ID_PPB_CURSORCONTROL: | 
|  143       proxy.reset(new PPB_CursorControl_Impl(instance)); |  144       proxy.reset(new PPB_CursorControl_Impl(instance)); | 
|  144       break; |  145       break; | 
|  145     case ::ppapi::proxy::INTERFACE_ID_PPB_FIND: |  146     case ::ppapi::proxy::INTERFACE_ID_PPB_FIND: | 
|  146       proxy.reset(new PPB_Find_Impl(instance)); |  147       proxy.reset(new PPB_Find_Impl(instance)); | 
|  147       break; |  148       break; | 
|  148     case ::ppapi::proxy::INTERFACE_ID_PPB_FONT: |  149     case ::ppapi::proxy::INTERFACE_ID_PPB_FONT: | 
|  149       proxy.reset(new PPB_Font_FunctionImpl(instance)); |  150       proxy.reset(new PPB_Font_FunctionImpl(instance)); | 
|  150       break; |  151       break; | 
 |  152     case ::ppapi::proxy::INTERFACE_ID_PPB_TEXTINPUT: | 
 |  153       proxy.reset(new PPB_TextInput_Impl(instance)); | 
 |  154       break; | 
|  151     case ::ppapi::proxy::INTERFACE_ID_RESOURCE_CREATION: |  155     case ::ppapi::proxy::INTERFACE_ID_RESOURCE_CREATION: | 
|  152       proxy.reset(new ResourceCreationImpl(instance)); |  156       proxy.reset(new ResourceCreationImpl(instance)); | 
|  153       break; |  157       break; | 
|  154     default: |  158     default: | 
|  155       NOTREACHED(); |  159       NOTREACHED(); | 
|  156   } |  160   } | 
|  157  |  161  | 
|  158   return proxy.get(); |  162   return proxy.get(); | 
|  159 } |  163 } | 
|  160  |  164  | 
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  320 } |  324 } | 
|  321  |  325  | 
|  322 // static |  326 // static | 
|  323 void ResourceTracker::ClearSingletonOverride() { |  327 void ResourceTracker::ClearSingletonOverride() { | 
|  324   DCHECK(singleton_override_); |  328   DCHECK(singleton_override_); | 
|  325   singleton_override_ = NULL; |  329   singleton_override_ = NULL; | 
|  326 } |  330 } | 
|  327  |  331  | 
|  328 }  // namespace ppapi |  332 }  // namespace ppapi | 
|  329 }  // namespace webkit |  333 }  // namespace webkit | 
|  330  |  | 
| OLD | NEW |