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 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
18 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 18 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
19 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | |
20 #include "third_party/WebKit/public/web/WebNavigationType.h" | |
21 #include "ui/base/page_transition_types.h" | 19 #include "ui/base/page_transition_types.h" |
22 #include "v8/include/v8.h" | 20 #include "v8/include/v8.h" |
23 | 21 |
24 class GURL; | 22 class GURL; |
25 class SkBitmap; | 23 class SkBitmap; |
26 | 24 |
27 namespace base { | 25 namespace base { |
28 class FilePath; | 26 class FilePath; |
29 class SingleThreadTaskRunner; | 27 class SingleThreadTaskRunner; |
30 } | 28 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // all widgets are hidden. | 183 // all widgets are hidden. |
186 virtual bool RunIdleHandlerWhenWidgetsHidden(); | 184 virtual bool RunIdleHandlerWhenWidgetsHidden(); |
187 | 185 |
188 // Returns true if the renderer process should allow shared timer suspension | 186 // Returns true if the renderer process should allow shared timer suspension |
189 // after the process has been backgrounded. Defaults to false. | 187 // after the process has been backgrounded. Defaults to false. |
190 virtual bool AllowTimerSuspensionWhenProcessBackgrounded(); | 188 virtual bool AllowTimerSuspensionWhenProcessBackgrounded(); |
191 | 189 |
192 // Returns true if a popup window should be allowed. | 190 // Returns true if a popup window should be allowed. |
193 virtual bool AllowPopup(); | 191 virtual bool AllowPopup(); |
194 | 192 |
195 #ifdef OS_ANDROID | |
196 // TODO(sgurun) This callback is deprecated and will be removed as soon | |
197 // as android webview completes implementation of a resource throttle based | |
198 // shouldoverrideurl implementation. See crbug.com/325351 | |
199 // | |
200 // Returns true if the navigation was handled by the embedder and should be | |
201 // ignored by WebKit. This method is used by CEF and android_webview. | |
202 virtual bool HandleNavigation(RenderFrame* render_frame, | |
203 bool is_content_initiated, | |
204 int opener_id, | |
205 blink::WebFrame* frame, | |
206 const blink::WebURLRequest& request, | |
207 blink::WebNavigationType type, | |
208 blink::WebNavigationPolicy default_policy, | |
209 bool is_redirect); | |
210 #endif | |
211 | |
212 // Returns true if we should fork a new process for the given navigation. | 193 // Returns true if we should fork a new process for the given navigation. |
213 // If |send_referrer| is set to false (which is the default), no referrer | 194 // If |send_referrer| is set to false (which is the default), no referrer |
214 // header will be send for the navigation. Otherwise, the referrer header is | 195 // header will be send for the navigation. Otherwise, the referrer header is |
215 // set according to the frame's referrer policy. | 196 // set according to the frame's referrer policy. |
216 virtual bool ShouldFork(blink::WebLocalFrame* frame, | 197 virtual bool ShouldFork(blink::WebLocalFrame* frame, |
217 const GURL& url, | 198 const GURL& url, |
218 const std::string& http_method, | 199 const std::string& http_method, |
219 bool is_initial_navigation, | 200 bool is_initial_navigation, |
220 bool is_server_redirect, | 201 bool is_server_redirect, |
221 bool* send_referrer); | 202 bool* send_referrer); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 const GURL& url) {} | 301 const GURL& url) {} |
321 | 302 |
322 // Whether this renderer should enforce preferences related to the WebRTC | 303 // Whether this renderer should enforce preferences related to the WebRTC |
323 // routing logic, i.e. allowing multiple routes and non-proxied UDP. | 304 // routing logic, i.e. allowing multiple routes and non-proxied UDP. |
324 virtual bool ShouldEnforceWebRTCRoutingPreferences(); | 305 virtual bool ShouldEnforceWebRTCRoutingPreferences(); |
325 }; | 306 }; |
326 | 307 |
327 } // namespace content | 308 } // namespace content |
328 | 309 |
329 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 310 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |