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

Side by Side Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.h

Issue 10912062: Implement the gamepad API in the IPC proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | 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_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto ry.h" 10 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto ry.h"
11 #include "content/common/content_export.h"
11 #include "content/public/browser/browser_ppapi_host.h" 12 #include "content/public/browser/browser_ppapi_host.h"
12 #include "ipc/ipc_channel_proxy.h" 13 #include "ipc/ipc_channel_proxy.h"
13 #include "ppapi/host/ppapi_host.h" 14 #include "ppapi/host/ppapi_host.h"
14 15
15 namespace IPC { 16 namespace IPC {
16 class Sender; 17 class Sender;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
21 class BrowserPpapiHostImpl : public BrowserPpapiHost, 22 class CONTENT_EXPORT BrowserPpapiHostImpl
22 public IPC::ChannelProxy::MessageFilter { 23 : public BrowserPpapiHost,
24 public IPC::ChannelProxy::MessageFilter {
23 public: 25 public:
26 // The creator is responsible for calling set_plugin_process_handle as soon
27 // as it is known (we start the process asynchronously so it won't be known
28 // when this object is created).
24 BrowserPpapiHostImpl(IPC::Sender* sender, 29 BrowserPpapiHostImpl(IPC::Sender* sender,
25 const ppapi::PpapiPermissions& permissions); 30 const ppapi::PpapiPermissions& permissions);
26 31
27 // IPC::ChannelProxy::MessageFilter. 32 // IPC::ChannelProxy::MessageFilter.
28 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 33 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
29 34
30 // BrowserPpapiHost. 35 // BrowserPpapiHost.
31 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; 36 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE;
37 virtual base::ProcessHandle GetPluginProcessHandle() const OVERRIDE;
38
39 void set_plugin_process_handle(base::ProcessHandle handle) {
40 plugin_process_handle_ = handle;
41 }
32 42
33 private: 43 private:
44 friend class BrowserPpapiHostTest;
45
34 virtual ~BrowserPpapiHostImpl(); 46 virtual ~BrowserPpapiHostImpl();
35 47
36 ContentBrowserPepperHostFactory host_factory_; 48 ContentBrowserPepperHostFactory host_factory_;
37 ppapi::host::PpapiHost ppapi_host_; 49 ppapi::host::PpapiHost ppapi_host_;
50 base::ProcessHandle plugin_process_handle_;
38 51
39 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl); 52 DISALLOW_COPY_AND_ASSIGN(BrowserPpapiHostImpl);
40 }; 53 };
41 54
42 } // namespace content 55 } // namespace content
43 56
44 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_ 57 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698