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

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

Issue 61063003: Keep NaCl plugins used in app background pages alive when active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: diii Created 7 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/process.h" 9 #include "base/process/process.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 16 matching lines...) Expand all
27 27
28 namespace content { 28 namespace content {
29 29
30 // Interface that allows components in the embedder app to talk to the 30 // Interface that allows components in the embedder app to talk to the
31 // PpapiHost in the browser process. 31 // PpapiHost in the browser process.
32 // 32 //
33 // There will be one of these objects in the browser per plugin process. It 33 // There will be one of these objects in the browser per plugin process. It
34 // lives entirely on the I/O thread. 34 // lives entirely on the I/O thread.
35 class CONTENT_EXPORT BrowserPpapiHost { 35 class CONTENT_EXPORT BrowserPpapiHost {
36 public: 36 public:
37 struct OnIdleChangeInstanceStruct {
38 int render_process_id;
39 int render_view_id;
40 GURL document_url;
41 };
42 typedef std::vector<OnIdleChangeInstanceStruct> OnIdleChangeInstanceData;
43 typedef base::Callback<
44 void (OnIdleChangeInstanceData intance_data,
45 base::FilePath profile_data_directory,
46 bool idle)>
47 OnIdleChangeCallback;
48
37 // Creates a browser host and sets up an out-of-process proxy for an external 49 // Creates a browser host and sets up an out-of-process proxy for an external
38 // pepper plugin process. 50 // pepper plugin process.
39 static BrowserPpapiHost* CreateExternalPluginProcess( 51 static BrowserPpapiHost* CreateExternalPluginProcess(
40 IPC::Sender* sender, 52 IPC::Sender* sender,
41 ppapi::PpapiPermissions permissions, 53 ppapi::PpapiPermissions permissions,
42 base::ProcessHandle plugin_child_process, 54 base::ProcessHandle plugin_child_process,
43 IPC::ChannelProxy* channel, 55 IPC::ChannelProxy* channel,
44 int render_process_id, 56 int render_process_id,
45 int render_view_id, 57 int render_view_id,
46 const base::FilePath& profile_directory); 58 const base::FilePath& profile_directory);
(...skipping 27 matching lines...) Expand all
74 86
75 // Returns the path of the plugin. 87 // Returns the path of the plugin.
76 virtual const base::FilePath& GetPluginPath() = 0; 88 virtual const base::FilePath& GetPluginPath() = 0;
77 89
78 // Returns the user's profile data directory. 90 // Returns the user's profile data directory.
79 virtual const base::FilePath& GetProfileDataDirectory() = 0; 91 virtual const base::FilePath& GetProfileDataDirectory() = 0;
80 92
81 // Get the Document/Plugin URLs for the given PP_Instance. 93 // Get the Document/Plugin URLs for the given PP_Instance.
82 virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0; 94 virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0;
83 virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0; 95 virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0;
96
97 // Set callback used when the plugin transitions in or out of an idle state.
dmichael (off chromium) 2013/11/15 18:26:22 nit: This comment could be a little clearer. "Set
scheib 2013/12/11 21:35:40 Done.
98 virtual void SetOnIdleChangeCallback(const OnIdleChangeCallback callback) = 0;
84 }; 99 };
85 100
86 } // namespace content 101 } // namespace content
87 102
88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ 103 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698