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

Side by Side Diff: content/renderer/pepper/plugin_delegate.h

Issue 19723010: Pepper Message Filters: Port to use explicit permission grants in ChildProcessSecurityPolicy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0044-write-support-remove-child-process-security-policy-bitmask-usage
Patch Set: Created 7 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
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_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_H_
6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_H_ 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 virtual Broker* ConnectToBroker(PPB_Broker_Impl* client) = 0; 441 virtual Broker* ConnectToBroker(PPB_Broker_Impl* client) = 0;
442 442
443 // Notifies that the number of find results has changed. 443 // Notifies that the number of find results has changed.
444 virtual void NumberOfFindResultsChanged(int identifier, 444 virtual void NumberOfFindResultsChanged(int identifier,
445 int total, 445 int total,
446 bool final_result) = 0; 446 bool final_result) = 0;
447 447
448 // Notifies that the index of the currently selected item has been updated. 448 // Notifies that the index of the currently selected item has been updated.
449 virtual void SelectedFindResultChanged(int identifier, int index) = 0; 449 virtual void SelectedFindResultChanged(int identifier, int index) = 0;
450 450
451 // Sends an async IPC to open a local file. 451 // Sends an async IPC to open a local file. |pp_open_flags| are Pepper flags.
452 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)> 452 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)>
453 AsyncOpenFileCallback; 453 AsyncOpenFileCallback;
454 virtual bool AsyncOpenFile(const base::FilePath& path, 454 virtual bool AsyncOpenFile(const base::FilePath& path,
455 int flags, 455 int pp_open_flags,
456 const AsyncOpenFileCallback& callback) = 0; 456 const AsyncOpenFileCallback& callback) = 0;
457 457
458 // These functions expose some of PepperFileSystemHost methods for 458 // These functions expose some of PepperFileSystemHost methods for
459 // PPB_FileRef_Impl (which is in webkit) to access. Once we migrate FileRef 459 // PPB_FileRef_Impl (which is in webkit) to access. Once we migrate FileRef
460 // to the new design in content/, we won't need this delegation. 460 // to the new design in content/, we won't need this delegation.
461 // TODO(victorhsieh): remove these delegation. 461 // TODO(victorhsieh): remove these delegation.
462 virtual bool IsFileSystemOpened(PP_Instance instance, 462 virtual bool IsFileSystemOpened(PP_Instance instance,
463 PP_Resource resource) const = 0; 463 PP_Resource resource) const = 0;
464 virtual PP_FileSystemType GetFileSystemType(PP_Instance instance, 464 virtual PP_FileSystemType GetFileSystemType(PP_Instance instance,
465 PP_Resource resource) const = 0; 465 PP_Resource resource) const = 0;
466 virtual GURL GetFileSystemRootUrl(PP_Instance instance, 466 virtual GURL GetFileSystemRootUrl(PP_Instance instance,
467 PP_Resource resource) const = 0; 467 PP_Resource resource) const = 0;
468 468
469 // Sends an async IPC to open a file through filesystem API. 469 // Sends an async IPC to open a file through filesystem API.
470 // When a file is successfully opened, |callback| is invoked with 470 // When a file is successfully opened, |callback| is invoked with
471 // PLATFORM_FILE_OK, the opened file handle, and a callback function for 471 // PLATFORM_FILE_OK, the opened file handle, and a callback function for
472 // notifying that the file is closed. When the users of this function 472 // notifying that the file is closed. When the users of this function
473 // finished using the file, they must close the file handle and then must call 473 // finished using the file, they must close the file handle and then must call
474 // the supplied callback function. 474 // the supplied callback function.
475 typedef base::Callback<void (base::PlatformFileError)> 475 typedef base::Callback<void (base::PlatformFileError)>
476 NotifyCloseFileCallback; 476 NotifyCloseFileCallback;
477 typedef base::Callback< 477 typedef base::Callback<
478 void (base::PlatformFileError error, 478 void (base::PlatformFileError error,
479 base::PassPlatformFile file, 479 base::PassPlatformFile file,
480 quota::QuotaLimitType quota_policy, 480 quota::QuotaLimitType quota_policy,
481 const NotifyCloseFileCallback& close_file_callback)> 481 const NotifyCloseFileCallback& close_file_callback)>
482 AsyncOpenFileSystemURLCallback; 482 AsyncOpenFileSystemURLCallback;
483 // |pp_open_flags| are Pepper flags.
483 virtual void AsyncOpenFileSystemURL( 484 virtual void AsyncOpenFileSystemURL(
484 const GURL& path, 485 const GURL& path,
485 int flags, 486 int pp_open_flags,
486 const AsyncOpenFileSystemURLCallback& callback) = 0; 487 const AsyncOpenFileSystemURLCallback& callback) = 0;
487 488
488 // Callback typedefs for FileSystem related methods. 489 // Callback typedefs for FileSystem related methods.
489 typedef base::Callback<void (base::PlatformFileError)> StatusCallback; 490 typedef base::Callback<void (base::PlatformFileError)> StatusCallback;
490 typedef base::Callback<void( 491 typedef base::Callback<void(
491 const std::vector<fileapi::DirectoryEntry>& entries, 492 const std::vector<fileapi::DirectoryEntry>& entries,
492 bool has_more)> ReadDirectoryCallback; 493 bool has_more)> ReadDirectoryCallback;
493 typedef base::Callback<void( 494 typedef base::Callback<void(
494 const base::PlatformFileInfo& file_info)> MetadataCallback; 495 const base::PlatformFileInfo& file_info)> MetadataCallback;
495 496
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 const base::FilePath& path, 672 const base::FilePath& path,
672 ::ppapi::PpapiPermissions permissions, 673 ::ppapi::PpapiPermissions permissions,
673 const IPC::ChannelHandle& channel_handle, 674 const IPC::ChannelHandle& channel_handle,
674 base::ProcessId plugin_pid, 675 base::ProcessId plugin_pid,
675 int plugin_child_id) = 0; 676 int plugin_child_id) = 0;
676 }; 677 };
677 678
678 } // namespace content 679 } // namespace content
679 680
680 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_H_ 681 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698