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

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

Issue 11819050: Revert 175890: actually, looks like we want this to also help move chromeos webui pages out of src/… (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 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2933 // must be handled by the browser process so that the correct bindings and 2933 // must be handled by the browser process so that the correct bindings and
2934 // data sources can be registered. 2934 // data sources can be registered.
2935 // Similarly, navigations to view-source URLs or within ViewSource mode 2935 // Similarly, navigations to view-source URLs or within ViewSource mode
2936 // must be handled by the browser process (except for reloads - those are 2936 // must be handled by the browser process (except for reloads - those are
2937 // safe to leave within the renderer). 2937 // safe to leave within the renderer).
2938 // Lastly, access to file:// URLs from non-file:// URL pages must be 2938 // Lastly, access to file:// URLs from non-file:// URL pages must be
2939 // handled by the browser so that ordinary renderer processes don't get 2939 // handled by the browser so that ordinary renderer processes don't get
2940 // blessed with file permissions. 2940 // blessed with file permissions.
2941 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); 2941 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
2942 bool is_initial_navigation = page_id_ == -1; 2942 bool is_initial_navigation = page_id_ == -1;
2943 bool should_fork = 2943 bool should_fork = HasWebUIScheme(url) ||
2944 GetContentClient()->HasWebUIScheme(url) ||
2945 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || 2944 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
2946 url.SchemeIs(chrome::kViewSourceScheme) || 2945 url.SchemeIs(chrome::kViewSourceScheme) ||
2947 (frame->isViewSourceModeEnabled() && 2946 (frame->isViewSourceModeEnabled() &&
2948 type != WebKit::WebNavigationTypeReload); 2947 type != WebKit::WebNavigationTypeReload);
2949 2948
2950 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) { 2949 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) {
2951 // Fork non-file to file opens. Check the opener URL if this is the 2950 // Fork non-file to file opens. Check the opener URL if this is the
2952 // initial navigation in a newly opened window. 2951 // initial navigation in a newly opened window.
2953 GURL source_url(old_url); 2952 GURL source_url(old_url);
2954 if (is_initial_navigation && source_url.is_empty() && frame->opener()) 2953 if (is_initial_navigation && source_url.is_empty() && frame->opener())
(...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after
6570 } 6569 }
6571 #endif 6570 #endif
6572 6571
6573 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6572 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6574 TransportDIB::Handle dib_handle) { 6573 TransportDIB::Handle dib_handle) {
6575 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6574 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6576 RenderProcess::current()->ReleaseTransportDIB(dib); 6575 RenderProcess::current()->ReleaseTransportDIB(dib);
6577 } 6576 }
6578 6577
6579 } // namespace content 6578 } // 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