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

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

Issue 11818036: Revert 175822 (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 2905 matching lines...) Expand 10 before | Expand all | Expand 10 after
2916 // must be handled by the browser process so that the correct bindings and 2916 // must be handled by the browser process so that the correct bindings and
2917 // data sources can be registered. 2917 // data sources can be registered.
2918 // Similarly, navigations to view-source URLs or within ViewSource mode 2918 // Similarly, navigations to view-source URLs or within ViewSource mode
2919 // must be handled by the browser process (except for reloads - those are 2919 // must be handled by the browser process (except for reloads - those are
2920 // safe to leave within the renderer). 2920 // safe to leave within the renderer).
2921 // Lastly, access to file:// URLs from non-file:// URL pages must be 2921 // Lastly, access to file:// URLs from non-file:// URL pages must be
2922 // handled by the browser so that ordinary renderer processes don't get 2922 // handled by the browser so that ordinary renderer processes don't get
2923 // blessed with file permissions. 2923 // blessed with file permissions.
2924 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); 2924 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
2925 bool is_initial_navigation = page_id_ == -1; 2925 bool is_initial_navigation = page_id_ == -1;
2926 bool should_fork = HasWebUIScheme(url) || 2926 bool should_fork =
2927 GetContentClient()->HasWebUIScheme(url) ||
2927 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || 2928 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
2928 url.SchemeIs(chrome::kViewSourceScheme) || 2929 url.SchemeIs(chrome::kViewSourceScheme) ||
2929 (frame->isViewSourceModeEnabled() && 2930 (frame->isViewSourceModeEnabled() &&
2930 type != WebKit::WebNavigationTypeReload); 2931 type != WebKit::WebNavigationTypeReload);
2931 2932
2932 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) { 2933 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) {
2933 // Fork non-file to file opens. Check the opener URL if this is the 2934 // Fork non-file to file opens. Check the opener URL if this is the
2934 // initial navigation in a newly opened window. 2935 // initial navigation in a newly opened window.
2935 GURL source_url(old_url); 2936 GURL source_url(old_url);
2936 if (is_initial_navigation && source_url.is_empty() && frame->opener()) 2937 if (is_initial_navigation && source_url.is_empty() && frame->opener())
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
6552 } 6553 }
6553 #endif 6554 #endif
6554 6555
6555 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6556 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6556 TransportDIB::Handle dib_handle) { 6557 TransportDIB::Handle dib_handle) {
6557 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6558 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6558 RenderProcess::current()->ReleaseTransportDIB(dib); 6559 RenderProcess::current()->ReleaseTransportDIB(dib);
6559 } 6560 }
6560 6561
6561 } // namespace content 6562 } // 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