Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: content/public/renderer/content_renderer_client.h

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix qinmin nit Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 virtual blink::WebSpeechSynthesizer* OverrideSpeechSynthesizer( 189 virtual blink::WebSpeechSynthesizer* OverrideSpeechSynthesizer(
192 blink::WebSpeechSynthesizerClient* client); 190 blink::WebSpeechSynthesizerClient* client);
193 191
194 // Returns true if the renderer process should schedule the idle handler when 192 // Returns true if the renderer process should schedule the idle handler when
195 // all widgets are hidden. 193 // all widgets are hidden.
196 virtual bool RunIdleHandlerWhenWidgetsHidden(); 194 virtual bool RunIdleHandlerWhenWidgetsHidden();
197 195
198 // Returns true if a popup window should be allowed. 196 // Returns true if a popup window should be allowed.
199 virtual bool AllowPopup(); 197 virtual bool AllowPopup();
200 198
201 #ifdef OS_ANDROID
202 // TODO(sgurun) This callback is deprecated and will be removed as soon
203 // as android webview completes implementation of a resource throttle based
204 // shouldoverrideurl implementation. See crbug.com/325351
205 //
206 // Returns true if the navigation was handled by the embedder and should be
207 // ignored by WebKit. This method is used by CEF and android_webview.
208 virtual bool HandleNavigation(RenderFrame* render_frame,
209 DocumentState* document_state,
210 int opener_id,
211 blink::WebFrame* frame,
212 const blink::WebURLRequest& request,
213 blink::WebNavigationType type,
214 blink::WebNavigationPolicy default_policy,
215 bool is_redirect);
216 #endif
217
218 // Returns true if we should fork a new process for the given navigation. 199 // Returns true if we should fork a new process for the given navigation.
219 // If |send_referrer| is set to false (which is the default), no referrer 200 // If |send_referrer| is set to false (which is the default), no referrer
220 // header will be send for the navigation. Otherwise, the referrer header is 201 // header will be send for the navigation. Otherwise, the referrer header is
221 // set according to the frame's referrer policy. 202 // set according to the frame's referrer policy.
222 virtual bool ShouldFork(blink::WebLocalFrame* frame, 203 virtual bool ShouldFork(blink::WebLocalFrame* frame,
223 const GURL& url, 204 const GURL& url,
224 const std::string& http_method, 205 const std::string& http_method,
225 bool is_initial_navigation, 206 bool is_initial_navigation,
226 bool is_server_redirect, 207 bool is_server_redirect,
227 bool* send_referrer); 208 bool* send_referrer);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Gives the embedder a chance to add properties to the context menu. 295 // Gives the embedder a chance to add properties to the context menu.
315 // Currently only called when the context menu is for an image. 296 // Currently only called when the context menu is for an image.
316 virtual void AddImageContextMenuProperties( 297 virtual void AddImageContextMenuProperties(
317 const blink::WebURLResponse& response, 298 const blink::WebURLResponse& response,
318 std::map<std::string, std::string>* properties) {} 299 std::map<std::string, std::string>* properties) {}
319 }; 300 };
320 301
321 } // namespace content 302 } // namespace content
322 303
323 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 304 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_content_renderer_client.cc ('k') | content/public/renderer/content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698