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

Side by Side Diff: content/public/browser/browser_ppapi_host.h

Issue 11359097: Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 26 matching lines...) Expand all
37 // There will be one of these objects in the browser per plugin process. It 37 // There will be one of these objects in the browser per plugin process. It
38 // lives entirely on the I/O thread. 38 // lives entirely on the I/O thread.
39 class CONTENT_EXPORT BrowserPpapiHost { 39 class CONTENT_EXPORT BrowserPpapiHost {
40 public: 40 public:
41 // Creates a browser host and sets up an out-of-process proxy for an external 41 // Creates a browser host and sets up an out-of-process proxy for an external
42 // pepper plugin process. 42 // pepper plugin process.
43 static BrowserPpapiHost* CreateExternalPluginProcess( 43 static BrowserPpapiHost* CreateExternalPluginProcess(
44 IPC::Sender* sender, 44 IPC::Sender* sender,
45 ppapi::PpapiPermissions permissions, 45 ppapi::PpapiPermissions permissions,
46 base::ProcessHandle plugin_child_process, 46 base::ProcessHandle plugin_child_process,
47 int plugin_child_process_id,
47 IPC::ChannelProxy* channel, 48 IPC::ChannelProxy* channel,
48 net::HostResolver* host_resolver, 49 net::HostResolver* host_resolver,
49 int render_process_id, 50 int render_process_id,
50 int render_view_id); 51 int render_view_id);
51 52
52 virtual ~BrowserPpapiHost() {} 53 virtual ~BrowserPpapiHost() {}
53 54
54 // Returns the PpapiHost object. 55 // Returns the PpapiHost object.
55 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; 56 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0;
56 57
57 // Returns the handle to the plugin process. 58 // Returns the handle to the plugin process.
58 virtual base::ProcessHandle GetPluginProcessHandle() const = 0; 59 virtual base::ProcessHandle GetPluginProcessHandle() const = 0;
59 60
60 // Returns true if the given PP_Instance is valid. 61 // Returns true if the given PP_Instance is valid.
61 virtual bool IsValidInstance(PP_Instance instance) const = 0; 62 virtual bool IsValidInstance(PP_Instance instance) const = 0;
62 63
63 // Retrieves the process/view Ids associated with the RenderView containing 64 // Retrieves the process/view Ids associated with the RenderView containing
64 // the given instance and returns true on success. If the instance is 65 // the given instance and returns true on success. If the instance is
65 // invalid, the ids will be 0 and false will be returned. 66 // invalid, the ids will be 0 and false will be returned.
66 // 67 //
67 // When a resource is created, the PP_Instance should already have been 68 // When a resource is created, the PP_Instance should already have been
68 // validated, and the resource hosts will be deleted when the resource is 69 // validated, and the resource hosts will be deleted when the resource is
69 // destroyed. So it should not generally be necessary to check for errors 70 // destroyed. So it should not generally be necessary to check for errors
70 // from this function except as a last-minute sanity check if you convert the 71 // from this function except as a last-minute sanity check if you convert the
71 // IDs to a RenderView/ProcessHost on the UI thread. 72 // IDs to a RenderView/ProcessHost on the UI thread.
72 virtual bool GetRenderViewIDsForInstance(PP_Instance instance, 73 virtual bool GetRenderViewIDsForInstance(PP_Instance instance,
73 int* render_process_id, 74 int* render_process_id,
74 int* render_view_id) const = 0; 75 int* render_view_id) const = 0;
76 // Returns the name of the plugin.
77 virtual const std::string& GetPluginName() = 0;
78
79 // Returns the user's profile data directory.
80 virtual const FilePath& GetProfileDataDirectory() = 0;
81
82 // Returns the unique id of the child plugin process (this is NOT the pid).
83 virtual int GetPluginProcessID() = 0;
75 }; 84 };
76 85
77 } // namespace content 86 } // namespace content
78 87
79 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ 88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698