blob: f40233c07397f89a23d8cc8a1a418b5bbe62a5eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_
#define EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/renderer/content_renderer_client.h"
namespace extensions {
class Dispatcher;
class DispatcherDelegate;
class ShellExtensionsClient;
class ShellExtensionsRendererClient;
class ShellRendererMainDelegate;
// Renderer initialization and runtime support for app_shell.
class ShellContentRendererClient : public content::ContentRendererClient {
public:
explicit ShellContentRendererClient(
scoped_ptr<ShellRendererMainDelegate> delegate);
virtual ~ShellContentRendererClient();
// content::ContentRendererClient implementation:
virtual void RenderThreadStarted() OVERRIDE;
virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE;
virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE;
virtual bool OverrideCreatePlugin(content::RenderFrame* render_frame,
blink::WebLocalFrame* frame,
const blink::WebPluginParams& params,
blink::WebPlugin** plugin) OVERRIDE;
virtual blink::WebPlugin* CreatePluginReplacement(
content::RenderFrame* render_frame,
const base::FilePath& plugin_path) OVERRIDE;
virtual bool WillSendRequest(blink::WebFrame* frame,
content::PageTransition transition_type,
const GURL& url,
const GURL& first_party_for_cookies,
GURL* new_url) OVERRIDE;
virtual void DidCreateScriptContext(blink::WebFrame* frame,
v8::Handle<v8::Context> context,
int extension_group,
int world_id) OVERRIDE;
virtual const void* CreatePPAPIInterface(
const std::string& interface_name) OVERRIDE;
virtual bool IsExternalPepperPlugin(const std::string& module_name) OVERRIDE;
virtual bool ShouldEnableSiteIsolationPolicy() const OVERRIDE;
private:
scoped_ptr<ShellRendererMainDelegate> delegate_;
scoped_ptr<ShellExtensionsClient> extensions_client_;
scoped_ptr<ShellExtensionsRendererClient> extensions_renderer_client_;
scoped_ptr<DispatcherDelegate> extension_dispatcher_delegate_;
scoped_ptr<Dispatcher> extension_dispatcher_;
DISALLOW_COPY_AND_ASSIGN(ShellContentRendererClient);
};
} // namespace extensions
#endif // EXTENSIONS_SHELL_RENDERER_SHELL_CONTENT_RENDERER_CLIENT_H_
|