OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/shell/shell_content_renderer_client.h" | 5 #include "content/shell/shell_content_renderer_client.h" |
6 | 6 |
7 #include "content/shell/shell_render_process_observer.h" | 7 #include "content/shell/shell_render_process_observer.h" |
8 #include "content/shell/shell_render_view_observer.h" | 8 #include "content/shell/shell_render_view_observer.h" |
9 #include "v8/include/v8.h" | 9 #include "v8/include/v8.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 ShellContentRendererClient::ShellContentRendererClient() { | 13 ShellContentRendererClient::ShellContentRendererClient() { |
14 } | 14 } |
15 | 15 |
16 ShellContentRendererClient::~ShellContentRendererClient() { | 16 ShellContentRendererClient::~ShellContentRendererClient() { |
17 } | 17 } |
18 | 18 |
19 void ShellContentRendererClient::RenderThreadStarted() { | 19 void ShellContentRendererClient::RenderThreadStarted() { |
20 shell_observer_.reset(new ShellRenderProcessObserver()); | 20 shell_observer_.reset(new ShellRenderProcessObserver()); |
21 } | 21 } |
22 | 22 |
23 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) { | 23 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) { |
24 new content::ShellRenderViewObserver(render_view); | 24 new content::ShellRenderViewObserver(render_view); |
25 } | 25 } |
26 | 26 |
27 void ShellContentRendererClient::SetNumberOfViews(int number_of_views) { | |
28 } | |
29 | |
30 SkBitmap* ShellContentRendererClient::GetSadPluginBitmap() { | |
31 return NULL; | |
32 } | |
33 | |
34 std::string ShellContentRendererClient::GetDefaultEncoding() { | |
35 return std::string(); | |
36 } | |
37 | |
38 bool ShellContentRendererClient::OverrideCreatePlugin( | |
39 RenderView* render_view, | |
40 WebKit::WebFrame* frame, | |
41 const WebKit::WebPluginParams& params, | |
42 WebKit::WebPlugin** plugin) { | |
43 return false; | |
44 } | |
45 | |
46 WebKit::WebPlugin* ShellContentRendererClient::CreatePluginReplacement( | |
47 RenderView* render_view, | |
48 const FilePath& plugin_path) { | |
49 return NULL; | |
50 } | |
51 | |
52 bool ShellContentRendererClient::HasErrorPage(int http_status_code, | |
53 std::string* error_domain) { | |
54 return false; | |
55 } | |
56 | |
57 void ShellContentRendererClient::GetNavigationErrorStrings( | |
58 const WebKit::WebURLRequest& failed_request, | |
59 const WebKit::WebURLError& error, | |
60 std::string* error_html, | |
61 string16* error_description) { | |
62 } | |
63 | |
64 webkit_media::WebMediaPlayerImpl* | |
65 ShellContentRendererClient::OverrideCreateWebMediaPlayer( | |
66 RenderView* render_view, | |
67 WebKit::WebFrame* frame, | |
68 WebKit::WebMediaPlayerClient* client, | |
69 base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate, | |
70 media::FilterCollection* collection, | |
71 WebKit::WebAudioSourceProvider* audio_source_provider, | |
72 media::MessageLoopFactory* message_loop_factory, | |
73 webkit_media::MediaStreamClient* media_stream_client, | |
74 media::MediaLog* media_log) { | |
75 return NULL; | |
76 } | |
77 | |
78 bool ShellContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { | |
79 return true; | |
80 } | |
81 | |
82 bool ShellContentRendererClient::AllowPopup(const GURL& creator) { | |
83 return false; | |
84 } | |
85 | |
86 bool ShellContentRendererClient::ShouldFork(WebKit::WebFrame* frame, | |
87 const GURL& url, | |
88 bool is_initial_navigation, | |
89 bool* send_referrer) { | |
90 return false; | |
91 } | |
92 | |
93 bool ShellContentRendererClient::WillSendRequest(WebKit::WebFrame* frame, | |
94 const GURL& url, | |
95 GURL* new_url) { | |
96 return false; | |
97 } | |
98 | |
99 bool ShellContentRendererClient::ShouldPumpEventsDuringCookieMessage() { | |
100 return false; | |
101 } | |
102 | |
103 void ShellContentRendererClient::DidCreateScriptContext( | |
104 WebKit::WebFrame* frame, v8::Handle<v8::Context> context, | |
105 int extension_group, int world_id) { | |
106 } | |
107 | |
108 void ShellContentRendererClient::WillReleaseScriptContext( | |
109 WebKit::WebFrame* frame, v8::Handle<v8::Context> context, int world_id) { | |
110 } | |
111 | |
112 unsigned long long ShellContentRendererClient::VisitedLinkHash( | |
113 const char* canonical_url, size_t length) { | |
114 return 0LL; | |
115 } | |
116 | |
117 bool ShellContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | |
118 return false; | |
119 } | |
120 | |
121 void ShellContentRendererClient::PrefetchHostName( | |
122 const char* hostname, size_t length) { | |
123 } | |
124 | |
125 bool ShellContentRendererClient::ShouldOverridePageVisibilityState( | |
126 const RenderView* render_view, | |
127 WebKit::WebPageVisibilityState* override_state) const { | |
128 return false; | |
129 } | |
130 | |
131 bool ShellContentRendererClient::HandleGetCookieRequest( | |
132 RenderView* sender, | |
133 const GURL& url, | |
134 const GURL& first_party_for_cookies, | |
135 std::string* cookies) { | |
136 return false; | |
137 } | |
138 | |
139 bool ShellContentRendererClient::HandleSetCookieRequest( | |
140 RenderView* sender, | |
141 const GURL& url, | |
142 const GURL& first_party_for_cookies, | |
143 const std::string& value) { | |
144 return false; | |
145 } | |
146 | |
147 void ShellContentRendererClient::RegisterPPAPIInterfaceFactories( | |
148 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | |
149 } | |
150 | |
151 } // namespace content | 27 } // namespace content |
OLD | NEW |