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

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

Powered by Google App Engine
This is Rietveld 408576698