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 ShellExtensionsClient; |
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 virtual ~ShellContentRendererClient(); | 25 virtual ~ShellContentRendererClient(); |
26 | 26 |
27 // content::ContentRendererClient implementation: | 27 // content::ContentRendererClient implementation: |
28 virtual void RenderThreadStarted() OVERRIDE; | 28 virtual void RenderThreadStarted() override; |
29 virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE; | 29 virtual void RenderFrameCreated(content::RenderFrame* render_frame) override; |
30 virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE; | 30 virtual void RenderViewCreated(content::RenderView* render_view) override; |
31 virtual bool OverrideCreatePlugin(content::RenderFrame* render_frame, | 31 virtual bool OverrideCreatePlugin(content::RenderFrame* render_frame, |
32 blink::WebLocalFrame* frame, | 32 blink::WebLocalFrame* frame, |
33 const blink::WebPluginParams& params, | 33 const blink::WebPluginParams& params, |
34 blink::WebPlugin** plugin) OVERRIDE; | 34 blink::WebPlugin** plugin) override; |
35 virtual blink::WebPlugin* CreatePluginReplacement( | 35 virtual blink::WebPlugin* CreatePluginReplacement( |
36 content::RenderFrame* render_frame, | 36 content::RenderFrame* render_frame, |
37 const base::FilePath& plugin_path) OVERRIDE; | 37 const base::FilePath& plugin_path) override; |
38 virtual bool WillSendRequest(blink::WebFrame* frame, | 38 virtual bool WillSendRequest(blink::WebFrame* frame, |
39 ui::PageTransition transition_type, | 39 ui::PageTransition transition_type, |
40 const GURL& url, | 40 const GURL& url, |
41 const GURL& first_party_for_cookies, | 41 const GURL& first_party_for_cookies, |
42 GURL* new_url) OVERRIDE; | 42 GURL* new_url) override; |
43 virtual void DidCreateScriptContext(blink::WebFrame* frame, | 43 virtual void DidCreateScriptContext(blink::WebFrame* frame, |
44 v8::Handle<v8::Context> context, | 44 v8::Handle<v8::Context> context, |
45 int extension_group, | 45 int extension_group, |
46 int world_id) OVERRIDE; | 46 int world_id) override; |
47 virtual const void* CreatePPAPIInterface( | 47 virtual const void* CreatePPAPIInterface( |
48 const std::string& interface_name) OVERRIDE; | 48 const std::string& interface_name) override; |
49 virtual bool IsExternalPepperPlugin(const std::string& module_name) OVERRIDE; | 49 virtual bool IsExternalPepperPlugin(const std::string& module_name) override; |
50 virtual bool ShouldEnableSiteIsolationPolicy() const OVERRIDE; | 50 virtual bool ShouldEnableSiteIsolationPolicy() const override; |
51 virtual content::BrowserPluginDelegate* CreateBrowserPluginDelegate( | 51 virtual content::BrowserPluginDelegate* CreateBrowserPluginDelegate( |
52 content::RenderFrame* render_frame, | 52 content::RenderFrame* render_frame, |
53 const std::string& mime_type) OVERRIDE; | 53 const std::string& mime_type) override; |
54 | 54 |
55 private: | 55 private: |
56 scoped_ptr<ShellExtensionsClient> extensions_client_; | 56 scoped_ptr<ShellExtensionsClient> extensions_client_; |
57 scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_; | 57 scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_; |
58 scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_; | 58 scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_; |
59 scoped_ptr<Dispatcher> extension_dispatcher_; | 59 scoped_ptr<Dispatcher> extension_dispatcher_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); | 61 DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace extensions | 64 } // namespace extensions |
65 | 65 |
66 #endif // EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ | 66 #endif // EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |