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

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

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/process.h" 9 #include "base/process.h"
9 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/render_view_host.h"
13 #include "ppapi/c/pp_instance.h"
10 14
11 namespace ppapi { 15 namespace ppapi {
12 namespace host { 16 namespace host {
13 class PpapiHost; 17 class PpapiHost;
14 } 18 }
15 } 19 }
16 20
17 namespace content { 21 namespace content {
18 22
19 // Interface that allows components in the embedder app to talk to the 23 // Interface that allows components in the embedder app to talk to the
20 // PpapiHost in the browser process. 24 // PpapiHost in the browser process.
21 // 25 //
22 // There will be one of these objects in the browser per plugin process. It 26 // There will be one of these objects in the browser per plugin process. It
23 // lives entirely on the I/O thread. 27 // lives entirely on the I/O thread.
24 class CONTENT_EXPORT BrowserPpapiHost { 28 class CONTENT_EXPORT BrowserPpapiHost {
25 public: 29 public:
30 struct RenderViewIDs {
31 int process_id;
32 int view_id;
33 };
34
26 // Returns the PpapiHost object. 35 // Returns the PpapiHost object.
27 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; 36 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0;
28 37
29 // Returns the handle to the plugin process. 38 // Returns the handle to the plugin process.
30 virtual base::ProcessHandle GetPluginProcessHandle() const = 0; 39 virtual base::ProcessHandle GetPluginProcessHandle() const = 0;
31 40
41 // Returns true if the given PP_Instance is valid.
42 virtual bool IsValidInstance(PP_Instance instance) const = 0;
43
44 // Returns the process/view Ids associated with the RenderView containing the
45 // given instance. If the instance is invalid, the ids will be 0.
46 //
47 // When a resource is created, the PP_Instance should already have been
48 // validated, and the resource hosts will be deleted when the resource is
49 // destroyed. So it should not generally be necessary to check for errors
50 // from this function except as a last-minute sanity check if you conver the
yzshen1 2012/09/11 20:43:22 conver->convert
51 // IDs to a RenderView/ProcessHost on the UI thread.
52 virtual RenderViewIDs GetRenderViewIDsForInstance(
53 PP_Instance instance) const = 0;
54
32 protected: 55 protected:
33 virtual ~BrowserPpapiHost() {} 56 virtual ~BrowserPpapiHost() {}
34 }; 57 };
35 58
36 } // namespace content 59 } // namespace content
37 60
38 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_ 61 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698