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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed changes related to cancelling with the HANDLED_EXTERNALLY status code Created 8 years, 6 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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 } 2724 }
2725 } 2725 }
2726 2726
2727 // In most cases, we receive this from a swapped out RenderViewHost. 2727 // In most cases, we receive this from a swapped out RenderViewHost.
2728 // It is possible to receive it from one that has just been swapped in, 2728 // It is possible to receive it from one that has just been swapped in,
2729 // in which case we might as well deliver the message anyway. 2729 // in which case we might as well deliver the message anyway.
2730 GetRenderViewHost()->Send(new ViewMsg_PostMessageEvent( 2730 GetRenderViewHost()->Send(new ViewMsg_PostMessageEvent(
2731 GetRenderViewHost()->GetRoutingID(), new_params)); 2731 GetRenderViewHost()->GetRoutingID(), new_params));
2732 } 2732 }
2733 2733
2734 bool WebContentsImpl::ShouldIgnoreNavigation(
darin (slow to review) 2012/05/31 21:13:39 I'm trying to understand why the embedder of a Web
mkosiba (inactive) 2012/06/01 20:35:12 Done. The main reason for this code is the FilterU
2735 const GURL& url,
2736 const content::Referrer& referrer,
2737 bool is_content_initiated) {
2738 if (!delegate_)
2739 return false;
2740
2741 GURL validated_url(url);
2742 RenderViewHostImpl* render_view_host_impl = GetRenderViewHostImpl();
2743 if (!render_view_host_impl)
2744 return false;
2745 render_view_host_impl->FilterURL(
darin (slow to review) 2012/05/31 21:13:39 nit: FilterURL is a static function so you don't n
mkosiba (inactive) 2012/06/01 20:35:12 Done.
2746 ChildProcessSecurityPolicyImpl::GetInstance(),
2747 render_view_host_impl->GetProcess()->GetID(),
2748 false,
2749 &validated_url);
2750 return delegate_->ShouldIgnoreNavigation(
2751 this, validated_url, referrer, is_content_initiated);
2752 }
2753
2734 void WebContentsImpl::RunJavaScriptMessage( 2754 void WebContentsImpl::RunJavaScriptMessage(
2735 RenderViewHost* rvh, 2755 RenderViewHost* rvh,
2736 const string16& message, 2756 const string16& message,
2737 const string16& default_prompt, 2757 const string16& default_prompt,
2738 const GURL& frame_url, 2758 const GURL& frame_url,
2739 content::JavaScriptMessageType javascript_message_type, 2759 content::JavaScriptMessageType javascript_message_type,
2740 IPC::Message* reply_msg, 2760 IPC::Message* reply_msg,
2741 bool* did_suppress_message) { 2761 bool* did_suppress_message) {
2742 // Suppress JavaScript dialogs when requested. Also suppress messages when 2762 // Suppress JavaScript dialogs when requested. Also suppress messages when
2743 // showing an interstitial as it's shown over the previous page and we don't 2763 // showing an interstitial as it's shown over the previous page and we don't
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 browser_plugin_host()->embedder_render_process_host(); 3087 browser_plugin_host()->embedder_render_process_host();
3068 *embedder_container_id = browser_plugin_host()->instance_id(); 3088 *embedder_container_id = browser_plugin_host()->instance_id();
3069 int embedder_process_id = 3089 int embedder_process_id =
3070 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3090 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3071 if (embedder_process_id != -1) { 3091 if (embedder_process_id != -1) {
3072 *embedder_channel_name = 3092 *embedder_channel_name =
3073 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3093 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3074 embedder_process_id); 3094 embedder_process_id);
3075 } 3095 }
3076 } 3096 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/resource_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698