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

Side by Side Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 16819002: PPAPI: Introduce PPB_NetworkProxy_Dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 6 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
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/resource.h » ('j') | 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) 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/ppb_instance_proxy.h" 5 #include "ppapi/proxy/ppb_instance_proxy.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/pp_time.h" 10 #include "ppapi/c/pp_time.h"
11 #include "ppapi/c/pp_var.h" 11 #include "ppapi/c/pp_var.h"
12 #include "ppapi/c/ppb_audio_config.h" 12 #include "ppapi/c/ppb_audio_config.h"
13 #include "ppapi/c/ppb_instance.h" 13 #include "ppapi/c/ppb_instance.h"
14 #include "ppapi/c/ppb_messaging.h" 14 #include "ppapi/c/ppb_messaging.h"
15 #include "ppapi/c/ppb_mouse_lock.h" 15 #include "ppapi/c/ppb_mouse_lock.h"
16 #include "ppapi/c/private/pp_content_decryptor.h" 16 #include "ppapi/c/private/pp_content_decryptor.h"
17 #include "ppapi/proxy/broker_resource.h" 17 #include "ppapi/proxy/broker_resource.h"
18 #include "ppapi/proxy/browser_font_singleton_resource.h" 18 #include "ppapi/proxy/browser_font_singleton_resource.h"
19 #include "ppapi/proxy/content_decryptor_private_serializer.h" 19 #include "ppapi/proxy/content_decryptor_private_serializer.h"
20 #include "ppapi/proxy/enter_proxy.h" 20 #include "ppapi/proxy/enter_proxy.h"
21 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" 21 #include "ppapi/proxy/ext_crx_file_system_private_resource.h"
22 #include "ppapi/proxy/extensions_common_resource.h" 22 #include "ppapi/proxy/extensions_common_resource.h"
23 #include "ppapi/proxy/flash_clipboard_resource.h" 23 #include "ppapi/proxy/flash_clipboard_resource.h"
24 #include "ppapi/proxy/flash_file_resource.h" 24 #include "ppapi/proxy/flash_file_resource.h"
25 #include "ppapi/proxy/flash_fullscreen_resource.h" 25 #include "ppapi/proxy/flash_fullscreen_resource.h"
26 #include "ppapi/proxy/flash_resource.h" 26 #include "ppapi/proxy/flash_resource.h"
27 #include "ppapi/proxy/gamepad_resource.h" 27 #include "ppapi/proxy/gamepad_resource.h"
28 #include "ppapi/proxy/host_dispatcher.h" 28 #include "ppapi/proxy/host_dispatcher.h"
29 #include "ppapi/proxy/network_proxy_resource.h"
29 #include "ppapi/proxy/pdf_resource.h" 30 #include "ppapi/proxy/pdf_resource.h"
30 #include "ppapi/proxy/plugin_dispatcher.h" 31 #include "ppapi/proxy/plugin_dispatcher.h"
31 #include "ppapi/proxy/ppapi_messages.h" 32 #include "ppapi/proxy/ppapi_messages.h"
32 #include "ppapi/proxy/serialized_var.h" 33 #include "ppapi/proxy/serialized_var.h"
33 #include "ppapi/proxy/truetype_font_singleton_resource.h" 34 #include "ppapi/proxy/truetype_font_singleton_resource.h"
34 #include "ppapi/shared_impl/ppapi_globals.h" 35 #include "ppapi/shared_impl/ppapi_globals.h"
35 #include "ppapi/shared_impl/ppb_url_util_shared.h" 36 #include "ppapi/shared_impl/ppb_url_util_shared.h"
36 #include "ppapi/shared_impl/ppb_view_shared.h" 37 #include "ppapi/shared_impl/ppb_view_shared.h"
37 #include "ppapi/shared_impl/var.h" 38 #include "ppapi/shared_impl/var.h"
38 #include "ppapi/thunk/enter.h" 39 #include "ppapi/thunk/enter.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (it != data->singleton_resources.end()) 364 if (it != data->singleton_resources.end())
364 return it->second.get(); 365 return it->second.get();
365 366
366 scoped_refptr<Resource> new_singleton; 367 scoped_refptr<Resource> new_singleton;
367 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 368 Connection connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
368 369
369 switch (id) { 370 switch (id) {
370 case BROKER_SINGLETON_ID: 371 case BROKER_SINGLETON_ID:
371 new_singleton = new BrokerResource(connection, instance); 372 new_singleton = new BrokerResource(connection, instance);
372 break; 373 break;
374 case CRX_FILESYSTEM_SINGLETON_ID:
375 new_singleton = new ExtCrxFileSystemPrivateResource(connection, instance);
376 break;
373 case EXTENSIONS_COMMON_SINGLETON_ID: 377 case EXTENSIONS_COMMON_SINGLETON_ID:
374 new_singleton = new ExtensionsCommonResource(connection, instance); 378 new_singleton = new ExtensionsCommonResource(connection, instance);
375 break; 379 break;
376 case GAMEPAD_SINGLETON_ID: 380 case GAMEPAD_SINGLETON_ID:
377 new_singleton = new GamepadResource(connection, instance); 381 new_singleton = new GamepadResource(connection, instance);
378 break; 382 break;
383 case NETWORK_PROXY_SINGLETON_ID:
384 new_singleton = new NetworkProxyResource(connection, instance);
385 break;
379 case TRUETYPE_FONT_SINGLETON_ID: 386 case TRUETYPE_FONT_SINGLETON_ID:
380 new_singleton = new TrueTypeFontSingletonResource(connection, instance); 387 new_singleton = new TrueTypeFontSingletonResource(connection, instance);
381 break; 388 break;
382 case CRX_FILESYSTEM_SINGLETON_ID:
383 new_singleton = new ExtCrxFileSystemPrivateResource(connection, instance);
384 break;
385 // Flash/trusted resources aren't needed for NaCl. 389 // Flash/trusted resources aren't needed for NaCl.
386 #if !defined(OS_NACL) && !defined(NACL_WIN64) 390 #if !defined(OS_NACL) && !defined(NACL_WIN64)
387 case BROWSER_FONT_SINGLETON_ID: 391 case BROWSER_FONT_SINGLETON_ID:
388 new_singleton = new BrowserFontSingletonResource(connection, instance); 392 new_singleton = new BrowserFontSingletonResource(connection, instance);
389 break; 393 break;
390 case FLASH_CLIPBOARD_SINGLETON_ID: 394 case FLASH_CLIPBOARD_SINGLETON_ID:
391 new_singleton = new FlashClipboardResource(connection, instance); 395 new_singleton = new FlashClipboardResource(connection, instance);
392 break; 396 break;
393 case FLASH_FILE_SINGLETON_ID: 397 case FLASH_FILE_SINGLETON_ID:
394 new_singleton = new FlashFileResource(connection, instance); 398 new_singleton = new FlashFileResource(connection, instance);
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 PP_Instance instance) { 1268 PP_Instance instance) {
1265 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 1269 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
1266 GetInstanceData(instance); 1270 GetInstanceData(instance);
1267 if (!data) 1271 if (!data)
1268 return; // Instance was probably deleted. 1272 return; // Instance was probably deleted.
1269 data->should_do_request_surrounding_text = false; 1273 data->should_do_request_surrounding_text = false;
1270 } 1274 }
1271 1275
1272 } // namespace proxy 1276 } // namespace proxy
1273 } // namespace ppapi 1277 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698