OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_PEPPER_HOST_FACTORY_H_ |
| 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_PEPPER_HOST_FACTORY_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
| 10 #include "ppapi/host/host_factory.h" |
| 11 |
| 12 namespace content { |
| 13 class BrowserPpapiHost; |
| 14 } // namespace content |
| 15 |
| 16 namespace extensions { |
| 17 |
| 18 // A simplified Pepper HostFactory that always replies that private browser |
| 19 // APIs are available. |
| 20 class ShellBrowserPepperHostFactory : public ppapi::host::HostFactory { |
| 21 public: |
| 22 // Non-owning pointer to the filter must outlive this class. |
| 23 explicit ShellBrowserPepperHostFactory(content::BrowserPpapiHost* host); |
| 24 virtual ~ShellBrowserPepperHostFactory(); |
| 25 |
| 26 // ppapi::host::HostFactory overrides: |
| 27 virtual scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost( |
| 28 ppapi::host::PpapiHost* host, |
| 29 const ppapi::proxy::ResourceMessageCallParams& params, |
| 30 PP_Instance instance, |
| 31 const IPC::Message& message) OVERRIDE; |
| 32 |
| 33 private: |
| 34 // Non-owning pointer. |
| 35 content::BrowserPpapiHost* host_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(ShellBrowserPepperHostFactory); |
| 38 }; |
| 39 |
| 40 } // namespace extensions |
| 41 |
| 42 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_PEPPER_HOST_FACTORY_H_ |
OLD | NEW |