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 APPS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define APPS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/renderer/content_renderer_client.h" |
| 12 |
| 13 namespace extensions { |
| 14 class Dispatcher; |
| 15 } |
| 16 |
| 17 namespace apps { |
| 18 |
| 19 class ShellExtensionsClient; |
| 20 |
| 21 // Renderer initialization and runtime support for app_shell. |
| 22 class ShellContentRendererClient : public content::ContentRendererClient { |
| 23 public: |
| 24 ShellContentRendererClient(); |
| 25 virtual ~ShellContentRendererClient(); |
| 26 |
| 27 // content::ContentRendererClient implementation: |
| 28 virtual void RenderThreadStarted() OVERRIDE; |
| 29 virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE; |
| 30 virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE; |
| 31 virtual bool WillSendRequest(blink::WebFrame* frame, |
| 32 content::PageTransition transition_type, |
| 33 const GURL& url, |
| 34 const GURL& first_party_for_cookies, |
| 35 GURL* new_url) OVERRIDE; |
| 36 virtual void DidCreateScriptContext(blink::WebFrame* frame, |
| 37 v8::Handle<v8::Context> context, |
| 38 int extension_group, |
| 39 int world_id) OVERRIDE; |
| 40 virtual void WillReleaseScriptContext(blink::WebFrame* frame, |
| 41 v8::Handle<v8::Context> context, |
| 42 int world_id) OVERRIDE; |
| 43 virtual bool ShouldEnableSiteIsolationPolicy() const OVERRIDE; |
| 44 |
| 45 private: |
| 46 scoped_ptr<ShellExtensionsClient> extensions_client_; |
| 47 scoped_ptr<extensions::Dispatcher> extension_dispatcher_; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient); |
| 50 }; |
| 51 |
| 52 } // namespace apps |
| 53 |
| 54 #endif // APPS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |