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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 11828040: Revert 175971 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after
2936 // must be handled by the browser process so that the correct bindings and 2936 // must be handled by the browser process so that the correct bindings and
2937 // data sources can be registered. 2937 // data sources can be registered.
2938 // Similarly, navigations to view-source URLs or within ViewSource mode 2938 // Similarly, navigations to view-source URLs or within ViewSource mode
2939 // must be handled by the browser process (except for reloads - those are 2939 // must be handled by the browser process (except for reloads - those are
2940 // safe to leave within the renderer). 2940 // safe to leave within the renderer).
2941 // Lastly, access to file:// URLs from non-file:// URL pages must be 2941 // Lastly, access to file:// URLs from non-file:// URL pages must be
2942 // handled by the browser so that ordinary renderer processes don't get 2942 // handled by the browser so that ordinary renderer processes don't get
2943 // blessed with file permissions. 2943 // blessed with file permissions.
2944 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); 2944 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
2945 bool is_initial_navigation = page_id_ == -1; 2945 bool is_initial_navigation = page_id_ == -1;
2946 bool should_fork = HasWebUIScheme(url) || 2946 bool should_fork =
2947 GetContentClient()->HasWebUIScheme(url) ||
2947 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || 2948 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
2948 url.SchemeIs(chrome::kViewSourceScheme) || 2949 url.SchemeIs(chrome::kViewSourceScheme) ||
2949 (frame->isViewSourceModeEnabled() && 2950 (frame->isViewSourceModeEnabled() &&
2950 type != WebKit::WebNavigationTypeReload); 2951 type != WebKit::WebNavigationTypeReload);
2951 2952
2952 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) { 2953 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) {
2953 // Fork non-file to file opens. Check the opener URL if this is the 2954 // Fork non-file to file opens. Check the opener URL if this is the
2954 // initial navigation in a newly opened window. 2955 // initial navigation in a newly opened window.
2955 GURL source_url(old_url); 2956 GURL source_url(old_url);
2956 if (is_initial_navigation && source_url.is_empty() && frame->opener()) 2957 if (is_initial_navigation && source_url.is_empty() && frame->opener())
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
6572 } 6573 }
6573 #endif 6574 #endif
6574 6575
6575 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6576 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6576 TransportDIB::Handle dib_handle) { 6577 TransportDIB::Handle dib_handle) {
6577 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6578 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6578 RenderProcess::current()->ReleaseTransportDIB(dib); 6579 RenderProcess::current()->ReleaseTransportDIB(dib);
6579 } 6580 }
6580 6581
6581 } // namespace content 6582 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698