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

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

Issue 3035005: Add private Pepper v2 API to get localized strings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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"
(...skipping 25 matching lines...) Expand all
36 #include "third_party/ppapi/c/pp_var.h" 36 #include "third_party/ppapi/c/pp_var.h"
37 #include "webkit/glue/plugins/pepper_buffer.h" 37 #include "webkit/glue/plugins/pepper_buffer.h"
38 #include "webkit/glue/plugins/pepper_device_context_2d.h" 38 #include "webkit/glue/plugins/pepper_device_context_2d.h"
39 #include "webkit/glue/plugins/pepper_directory_reader.h" 39 #include "webkit/glue/plugins/pepper_directory_reader.h"
40 #include "webkit/glue/plugins/pepper_file_io.h" 40 #include "webkit/glue/plugins/pepper_file_io.h"
41 #include "webkit/glue/plugins/pepper_file_ref.h" 41 #include "webkit/glue/plugins/pepper_file_ref.h"
42 #include "webkit/glue/plugins/pepper_file_system.h" 42 #include "webkit/glue/plugins/pepper_file_system.h"
43 #include "webkit/glue/plugins/pepper_font.h" 43 #include "webkit/glue/plugins/pepper_font.h"
44 #include "webkit/glue/plugins/pepper_image_data.h" 44 #include "webkit/glue/plugins/pepper_image_data.h"
45 #include "webkit/glue/plugins/pepper_plugin_instance.h" 45 #include "webkit/glue/plugins/pepper_plugin_instance.h"
46 #include "webkit/glue/plugins/pepper_private.h"
46 #include "webkit/glue/plugins/pepper_resource_tracker.h" 47 #include "webkit/glue/plugins/pepper_resource_tracker.h"
47 #include "webkit/glue/plugins/pepper_scrollbar.h" 48 #include "webkit/glue/plugins/pepper_scrollbar.h"
48 #include "webkit/glue/plugins/pepper_url_loader.h" 49 #include "webkit/glue/plugins/pepper_url_loader.h"
49 #include "webkit/glue/plugins/pepper_url_request_info.h" 50 #include "webkit/glue/plugins/pepper_url_request_info.h"
50 #include "webkit/glue/plugins/pepper_url_response_info.h" 51 #include "webkit/glue/plugins/pepper_url_response_info.h"
51 #include "webkit/glue/plugins/pepper_var.h" 52 #include "webkit/glue/plugins/pepper_var.h"
52 #include "webkit/glue/plugins/pepper_widget.h" 53 #include "webkit/glue/plugins/pepper_widget.h"
54 #include "webkit/glue/plugins/ppb_private.h"
53 55
54 namespace pepper { 56 namespace pepper {
55 57
56 namespace { 58 namespace {
57 59
58 // Maintains all currently loaded plugin libs for validating PP_Module 60 // Maintains all currently loaded plugin libs for validating PP_Module
59 // identifiers. 61 // identifiers.
60 typedef std::set<PluginModule*> PluginModuleSet; 62 typedef std::set<PluginModule*> PluginModuleSet;
61 63
62 PluginModuleSet* GetLivePluginSet() { 64 PluginModuleSet* GetLivePluginSet() {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (strcmp(name, PPB_DIRECTORYREADER_INTERFACE) == 0) 183 if (strcmp(name, PPB_DIRECTORYREADER_INTERFACE) == 0)
182 return DirectoryReader::GetInterface(); 184 return DirectoryReader::GetInterface();
183 if (strcmp(name, PPB_WIDGET_INTERFACE) == 0) 185 if (strcmp(name, PPB_WIDGET_INTERFACE) == 0)
184 return Widget::GetInterface(); 186 return Widget::GetInterface();
185 if (strcmp(name, PPB_SCROLLBAR_INTERFACE) == 0) 187 if (strcmp(name, PPB_SCROLLBAR_INTERFACE) == 0)
186 return Scrollbar::GetInterface(); 188 return Scrollbar::GetInterface();
187 if (strcmp(name, PPB_FONT_INTERFACE) == 0) 189 if (strcmp(name, PPB_FONT_INTERFACE) == 0)
188 return Font::GetInterface(); 190 return Font::GetInterface();
189 if (strcmp(name, PPB_FIND_INTERFACE) == 0) 191 if (strcmp(name, PPB_FIND_INTERFACE) == 0)
190 return PluginInstance::GetFindInterface(); 192 return PluginInstance::GetFindInterface();
193 if (strcmp(name, PPB_PRIVATE_INTERFACE) == 0)
194 return Private::GetInterface();
191 195
192 // Only support the testing interface when the command line switch is 196 // Only support the testing interface when the command line switch is
193 // specified. This allows us to prevent people from (ab)using this interface 197 // specified. This allows us to prevent people from (ab)using this interface
194 // in production code. 198 // in production code.
195 if (strcmp(name, PPB_TESTING_INTERFACE) == 0) { 199 if (strcmp(name, PPB_TESTING_INTERFACE) == 0) {
196 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) 200 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing"))
197 return &testing_interface; 201 return &testing_interface;
198 } 202 }
199 return NULL; 203 return NULL;
200 } 204 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 359
356 void PluginModule::InstanceCreated(PluginInstance* instance) { 360 void PluginModule::InstanceCreated(PluginInstance* instance) {
357 instances_.insert(instance); 361 instances_.insert(instance);
358 } 362 }
359 363
360 void PluginModule::InstanceDeleted(PluginInstance* instance) { 364 void PluginModule::InstanceDeleted(PluginInstance* instance) {
361 instances_.erase(instance); 365 instances_.erase(instance);
362 } 366 }
363 367
364 } // namespace pepper 368 } // namespace pepper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698