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

Side by Side Diff: webkit/plugins/ppapi/host_globals.cc

Issue 8365017: Convert the flash clipboard API to thunk system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/host_globals.h" 5 #include "webkit/plugins/ppapi/host_globals.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
11 #include "ppapi/shared_impl/api_id.h" 11 #include "ppapi/shared_impl/api_id.h"
12 #include "ppapi/shared_impl/function_group_base.h" 12 #include "ppapi/shared_impl/function_group_base.h"
13 #include "ppapi/shared_impl/id_assignment.h" 13 #include "ppapi/shared_impl/id_assignment.h"
14 #include "webkit/plugins/ppapi/plugin_module.h" 14 #include "webkit/plugins/ppapi/plugin_module.h"
15 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 15 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
16 #include "webkit/plugins/ppapi/ppb_cursor_control_impl.h" 16 #include "webkit/plugins/ppapi/ppb_cursor_control_impl.h"
17 #include "webkit/plugins/ppapi/ppb_flash_clipboard_impl.h"
17 #include "webkit/plugins/ppapi/ppb_font_impl.h" 18 #include "webkit/plugins/ppapi/ppb_font_impl.h"
18 #include "webkit/plugins/ppapi/ppb_text_input_impl.h" 19 #include "webkit/plugins/ppapi/ppb_text_input_impl.h"
19 #include "webkit/plugins/ppapi/resource_creation_impl.h" 20 #include "webkit/plugins/ppapi/resource_creation_impl.h"
20 21
21 using ppapi::CheckIdType; 22 using ppapi::CheckIdType;
22 using ppapi::MakeTypedId; 23 using ppapi::MakeTypedId;
23 using ppapi::PPIdType; 24 using ppapi::PPIdType;
24 25
25 namespace webkit { 26 namespace webkit {
26 namespace ppapi { 27 namespace ppapi {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 break; 82 break;
82 case ::ppapi::API_ID_PPB_FONT: 83 case ::ppapi::API_ID_PPB_FONT:
83 proxy.reset(new PPB_Font_FunctionImpl(instance)); 84 proxy.reset(new PPB_Font_FunctionImpl(instance));
84 break; 85 break;
85 case ::ppapi::API_ID_PPB_TEXT_INPUT: 86 case ::ppapi::API_ID_PPB_TEXT_INPUT:
86 proxy.reset(new PPB_TextInput_Impl(instance)); 87 proxy.reset(new PPB_TextInput_Impl(instance));
87 break; 88 break;
88 case ::ppapi::API_ID_RESOURCE_CREATION: 89 case ::ppapi::API_ID_RESOURCE_CREATION:
89 proxy.reset(new ResourceCreationImpl(instance)); 90 proxy.reset(new ResourceCreationImpl(instance));
90 break; 91 break;
92 case ::ppapi::API_ID_PPB_FLASH_CLIPBOARD:
93 proxy.reset(new PPB_Flash_Clipboard_Impl(instance));
94 break;
91 default: 95 default:
92 NOTREACHED(); 96 NOTREACHED();
93 } 97 }
94 98
95 return proxy.get(); 99 return proxy.get();
96 } 100 }
97 101
98 PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) { 102 PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) {
99 PluginInstance* inst = GetInstance(instance); 103 PluginInstance* inst = GetInstance(instance);
100 if (!inst) 104 if (!inst)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DLOG_IF(ERROR, !CheckIdType(instance, ::ppapi::PP_ID_TYPE_INSTANCE)) 182 DLOG_IF(ERROR, !CheckIdType(instance, ::ppapi::PP_ID_TYPE_INSTANCE))
179 << instance << " is not a PP_Instance."; 183 << instance << " is not a PP_Instance.";
180 InstanceMap::iterator found = instance_map_.find(instance); 184 InstanceMap::iterator found = instance_map_.find(instance);
181 if (found == instance_map_.end()) 185 if (found == instance_map_.end())
182 return NULL; 186 return NULL;
183 return found->second->instance; 187 return found->second->instance;
184 } 188 }
185 189
186 } // namespace ppapi 190 } // namespace ppapi
187 } // namespace webkit 191 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698