OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
6 #define EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ | 6 #define EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "content/public/renderer/content_renderer_client.h" | 11 #include "content/public/renderer/content_renderer_client.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 class Dispatcher; | 15 class Dispatcher; |
16 class DispatcherDelegate; | 16 class DispatcherDelegate; |
17 class ShellExtensionsClient; | 17 class ExtensionsClient; |
18 class ShellExtensionsRendererClient; | 18 class ShellExtensionsRendererClient; |
19 class ShellRendererMainDelegate; | 19 class ShellRendererMainDelegate; |
20 | 20 |
21 // Renderer initialization and runtime support for app_shell. | 21 // Renderer initialization and runtime support for app_shell. |
22 class ShellContentRendererClient : public content::ContentRendererClient { | 22 class ShellContentRendererClient : public content::ContentRendererClient { |
23 public: | 23 public: |
24 ShellContentRendererClient(); | 24 ShellContentRendererClient(); |
25 ~ShellContentRendererClient() override; | 25 ~ShellContentRendererClient() override; |
26 | 26 |
27 // content::ContentRendererClient implementation: | 27 // content::ContentRendererClient implementation: |
(...skipping 17 matching lines...) Expand all Loading... |
45 int extension_group, | 45 int extension_group, |
46 int world_id) override; | 46 int world_id) override; |
47 const void* CreatePPAPIInterface(const std::string& interface_name) override; | 47 const void* CreatePPAPIInterface(const std::string& interface_name) override; |
48 bool IsExternalPepperPlugin(const std::string& module_name) override; | 48 bool IsExternalPepperPlugin(const std::string& module_name) override; |
49 bool ShouldEnableSiteIsolationPolicy() const override; | 49 bool ShouldEnableSiteIsolationPolicy() const override; |
50 content::BrowserPluginDelegate* CreateBrowserPluginDelegate( | 50 content::BrowserPluginDelegate* CreateBrowserPluginDelegate( |
51 content::RenderFrame* render_frame, | 51 content::RenderFrame* render_frame, |
52 const std::string& mime_type, | 52 const std::string& mime_type, |
53 const GURL& original_url) override; | 53 const GURL& original_url) override; |
54 | 54 |
| 55 protected: |
| 56 // app_shell embedders may need custom extensions client interfaces. |
| 57 // This class takes ownership of the returned object. |
| 58 virtual ExtensionsClient* CreateExtensionsClient(); |
| 59 |
55 private: | 60 private: |
56 scoped_ptr<ShellExtensionsClient> extensions_client_; | 61 scoped_ptr<ExtensionsClient> extensions_client_; |
57 scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_; | 62 scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_; |
58 scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_; | 63 scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_; |
59 scoped_ptr<Dispatcher> extension_dispatcher_; | 64 scoped_ptr<Dispatcher> extension_dispatcher_; |
60 | 65 |
61 DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); | 66 DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); |
62 }; | 67 }; |
63 | 68 |
64 } // namespace extensions | 69 } // namespace extensions |
65 | 70 |
66 #endif // EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ | 71 #endif // EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |