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