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

Side by Side Diff: webkit/glue/plugins/pepper_plugin_module.cc

Issue 2896009: add find hookup (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: update DEPS Created 10 years, 5 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
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/glue/plugins/pepper_plugin_module.h" 5 #include "webkit/glue/plugins/pepper_plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "third_party/ppapi/c/ppb_buffer.h" 15 #include "third_party/ppapi/c/ppb_buffer.h"
16 #include "third_party/ppapi/c/ppb_core.h" 16 #include "third_party/ppapi/c/ppb_core.h"
17 #include "third_party/ppapi/c/ppb_device_context_2d.h" 17 #include "third_party/ppapi/c/ppb_device_context_2d.h"
18 #include "third_party/ppapi/c/ppb_file_io.h" 18 #include "third_party/ppapi/c/ppb_file_io.h"
19 #include "third_party/ppapi/c/ppb_file_io_trusted.h" 19 #include "third_party/ppapi/c/ppb_file_io_trusted.h"
20 #include "third_party/ppapi/c/ppb_file_system.h" 20 #include "third_party/ppapi/c/ppb_file_system.h"
21 #include "third_party/ppapi/c/ppb_image_data.h" 21 #include "third_party/ppapi/c/ppb_image_data.h"
22 #include "third_party/ppapi/c/ppb_instance.h"
23 #include "third_party/ppapi/c/ppb_find.h"
22 #include "third_party/ppapi/c/ppb_font.h" 24 #include "third_party/ppapi/c/ppb_font.h"
23 #include "third_party/ppapi/c/ppb_instance.h"
24 #include "third_party/ppapi/c/ppb_scrollbar.h" 25 #include "third_party/ppapi/c/ppb_scrollbar.h"
25 #include "third_party/ppapi/c/ppb_testing.h" 26 #include "third_party/ppapi/c/ppb_testing.h"
26 #include "third_party/ppapi/c/ppb_url_loader.h" 27 #include "third_party/ppapi/c/ppb_url_loader.h"
27 #include "third_party/ppapi/c/ppb_url_request_info.h" 28 #include "third_party/ppapi/c/ppb_url_request_info.h"
28 #include "third_party/ppapi/c/ppb_url_response_info.h" 29 #include "third_party/ppapi/c/ppb_url_response_info.h"
29 #include "third_party/ppapi/c/ppb_var.h" 30 #include "third_party/ppapi/c/ppb_var.h"
30 #include "third_party/ppapi/c/ppb_widget.h" 31 #include "third_party/ppapi/c/ppb_widget.h"
31 #include "third_party/ppapi/c/ppp.h" 32 #include "third_party/ppapi/c/ppp.h"
32 #include "third_party/ppapi/c/ppp_instance.h" 33 #include "third_party/ppapi/c/ppp_instance.h"
33 #include "third_party/ppapi/c/pp_module.h" 34 #include "third_party/ppapi/c/pp_module.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (strcmp(name, PPB_FILESYSTEM_INTERFACE) == 0) 179 if (strcmp(name, PPB_FILESYSTEM_INTERFACE) == 0)
179 return FileSystem::GetInterface(); 180 return FileSystem::GetInterface();
180 if (strcmp(name, PPB_DIRECTORYREADER_INTERFACE) == 0) 181 if (strcmp(name, PPB_DIRECTORYREADER_INTERFACE) == 0)
181 return DirectoryReader::GetInterface(); 182 return DirectoryReader::GetInterface();
182 if (strcmp(name, PPB_WIDGET_INTERFACE) == 0) 183 if (strcmp(name, PPB_WIDGET_INTERFACE) == 0)
183 return Widget::GetInterface(); 184 return Widget::GetInterface();
184 if (strcmp(name, PPB_SCROLLBAR_INTERFACE) == 0) 185 if (strcmp(name, PPB_SCROLLBAR_INTERFACE) == 0)
185 return Scrollbar::GetInterface(); 186 return Scrollbar::GetInterface();
186 if (strcmp(name, PPB_FONT_INTERFACE) == 0) 187 if (strcmp(name, PPB_FONT_INTERFACE) == 0)
187 return Font::GetInterface(); 188 return Font::GetInterface();
189 if (strcmp(name, PPB_FIND_INTERFACE) == 0)
190 return PluginInstance::GetFindInterface();
188 191
189 // Only support the testing interface when the command line switch is 192 // Only support the testing interface when the command line switch is
190 // specified. This allows us to prevent people from (ab)using this interface 193 // specified. This allows us to prevent people from (ab)using this interface
191 // in production code. 194 // in production code.
192 if (strcmp(name, PPB_TESTING_INTERFACE) == 0) { 195 if (strcmp(name, PPB_TESTING_INTERFACE) == 0) {
193 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) 196 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing"))
194 return &testing_interface; 197 return &testing_interface;
195 } 198 }
196 return NULL; 199 return NULL;
197 } 200 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 350
348 void PluginModule::InstanceCreated(PluginInstance* instance) { 351 void PluginModule::InstanceCreated(PluginInstance* instance) {
349 instances_.insert(instance); 352 instances_.insert(instance);
350 } 353 }
351 354
352 void PluginModule::InstanceDeleted(PluginInstance* instance) { 355 void PluginModule::InstanceDeleted(PluginInstance* instance) {
353 instances_.erase(instance); 356 instances_.erase(instance);
354 } 357 }
355 358
356 } // namespace pepper 359 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698