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

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: nit 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 CONTENT_EXPORT int GetRoutingId() const; 423 CONTENT_EXPORT int GetRoutingId() const;
424 424
425 private: 425 private:
426 // Asynchronously attempts to create a PPAPI broker for the given plugin. 426 // Asynchronously attempts to create a PPAPI broker for the given plugin.
427 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker( 427 scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker(
428 webkit::ppapi::PluginModule* plugin_module); 428 webkit::ppapi::PluginModule* plugin_module);
429 429
430 // Implementation of PepperParentContextProvider. 430 // Implementation of PepperParentContextProvider.
431 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE; 431 virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE;
432 432
433 // Helper function to check that TCP/UDP private APIs are allowed for current
434 // page. This check actually allows socket usage for NativeClient code only.
435 // It is better to move this check to browser process but Pepper message
436 // filters in browser process have no context about page that sent
437 // the request. Doing this check in render process is safe because NaCl code
438 // is executed in separate NaCl process.
439 // TODO(dpolukhin, yzshen): make the check consistent for in- and out-process
440 // cases and do the check during socket creation in the browser process.
441 bool CanUseSocketAPIs();
442
443 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter( 433 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(
444 webkit::ppapi::PluginInstance* instance); 434 webkit::ppapi::PluginInstance* instance);
445 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance); 435 void UnSetAndDeleteLockTargetAdapter(webkit::ppapi::PluginInstance* instance);
446 436
447 // Pointer to the RenderView that owns us. 437 // Pointer to the RenderView that owns us.
448 RenderViewImpl* render_view_; 438 RenderViewImpl* render_view_;
449 439
450 std::set<webkit::ppapi::PluginInstance*> active_instances_; 440 std::set<webkit::ppapi::PluginInstance*> active_instances_;
451 typedef std::map<webkit::ppapi::PluginInstance*, 441 typedef std::map<webkit::ppapi::PluginInstance*,
452 MouseLockDispatcher::LockTarget*> LockTargetMap; 442 MouseLockDispatcher::LockTarget*> LockTargetMap;
(...skipping 30 matching lines...) Expand all
483 // |last_mouse_event_target_| is not owned by this class. We can know about 473 // |last_mouse_event_target_| is not owned by this class. We can know about
484 // when it is destroyed via InstanceDeleted(). 474 // when it is destroyed via InstanceDeleted().
485 webkit::ppapi::PluginInstance* last_mouse_event_target_; 475 webkit::ppapi::PluginInstance* last_mouse_event_target_;
486 476
487 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 477 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
488 478
489 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 479 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
490 }; 480 };
491 481
492 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 482 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698