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

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.h

Issue 9379002: Move socket API restriction check to browser process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 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) 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 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 private: 446 private:
447 class DeviceEnumerationEventHandler; 447 class DeviceEnumerationEventHandler;
448 448
449 // Asynchronously attempts to create a PPAPI broker for the given plugin. 449 // Asynchronously attempts to create a PPAPI broker for the given plugin.
450 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker( 450 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker(
451 webkit::ppapi::PluginModule* plugin_module); 451 webkit::ppapi::PluginModule* plugin_module);
452 452
453 // Implementation of PepperParentContextProvider. 453 // Implementation of PepperParentContextProvider.
454 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE; 454 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE;
455 455
456 // Helper function to check that TCP/UDP private APIs are allowed for current
457 // page. This check actually allows socket usage for NativeClient code only.
458 // It is better to move this check to browser process but Pepper message
459 // filters in browser process have no context about page that sent
460 // the request. Doing this check in render process is safe because NaCl code
461 // is executed in separate NaCl process.
462 // TODO(dpolukhin, yzshen): make the check consistent for in- and out-process
463 // cases and do the check during socket creation in the browser process.
464 bool CanUseSocketAPIs();
465
466 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter( 456 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(
467 webkit::ppapi::PluginInstance* instance); 457 webkit::ppapi::PluginInstance* instance);
468 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance); 458 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance);
469 459
470 // Pointer to the RenderView that owns us. 460 // Pointer to the RenderView that owns us.
471 RenderViewImpl* render_view_; 461 RenderViewImpl* render_view_;
472 462
473 std::set<webkit::ppapi::PluginInstance*> active_instances_; 463 std::set<webkit::ppapi::PluginInstance*> active_instances_;
474 typedef std::map<webkit::ppapi::PluginInstance*, 464 typedef std::map<webkit::ppapi::PluginInstance*,
475 MouseLockDispatcher::LockTarget*> LockTargetMap; 465 MouseLockDispatcher::LockTarget*> LockTargetMap;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 webkit::ppapi::PluginInstance* last_mouse_event_target_; 498 webkit::ppapi::PluginInstance* last_mouse_event_target_;
509 499
510 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 500 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
511 501
512 scoped_ptr<DeviceEnumerationEventHandler> device_enumeration_event_handler_; 502 scoped_ptr<DeviceEnumerationEventHandler> device_enumeration_event_handler_;
513 503
514 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 504 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
515 }; 505 };
516 506
517 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 507 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/mock_content_renderer_client.cc ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698