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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 140073002: <webview>: navigating to WebStore should fire a loadabort instead of crashing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 11 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1622 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1623 delegate_->ToggleFullscreenMode(enter_fullscreen); 1623 delegate_->ToggleFullscreenMode(enter_fullscreen);
1624 // We need to notify the contents that its fullscreen state has changed. This 1624 // We need to notify the contents that its fullscreen state has changed. This
1625 // is done as part of the resize message. 1625 // is done as part of the resize message.
1626 WasResized(); 1626 WasResized();
1627 } 1627 }
1628 1628
1629 void RenderViewHostImpl::OnOpenURL( 1629 void RenderViewHostImpl::OnOpenURL(
1630 const ViewHostMsg_OpenURL_Params& params) { 1630 const ViewHostMsg_OpenURL_Params& params) {
1631 GURL validated_url(params.url); 1631 GURL validated_url(params.url);
1632 GetProcess()->FilterURL(false, &validated_url); 1632 // BrowserPluginGuest does filtering after firing a loadabort event.
1633 if (!GetProcess()->IsGuest())
1634 GetProcess()->FilterURL(false, &validated_url);
1633 1635
1634 delegate_->RequestOpenURL( 1636 delegate_->RequestOpenURL(
1635 this, validated_url, params.referrer, params.disposition, params.frame_id, 1637 this, validated_url, params.referrer, params.disposition, params.frame_id,
1636 params.should_replace_current_entry, params.user_gesture); 1638 params.should_replace_current_entry, params.user_gesture);
1637 } 1639 }
1638 1640
1639 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( 1641 void RenderViewHostImpl::OnDidContentsPreferredSizeChange(
1640 const gfx::Size& new_size) { 1642 const gfx::Size& new_size) {
1641 delegate_->UpdatePreferredSize(new_size); 1643 delegate_->UpdatePreferredSize(new_size);
1642 } 1644 }
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
2257 void RenderViewHostImpl::AttachToFrameTree() { 2259 void RenderViewHostImpl::AttachToFrameTree() {
2258 FrameTree* frame_tree = delegate_->GetFrameTree(); 2260 FrameTree* frame_tree = delegate_->GetFrameTree();
2259 2261
2260 frame_tree->ResetForMainFrameSwap(); 2262 frame_tree->ResetForMainFrameSwap();
2261 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2263 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2262 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2264 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2263 } 2265 }
2264 } 2266 }
2265 2267
2266 } // namespace content 2268 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698