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

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

Issue 11783038: Allow multiple WebUIControllerFactory objects to be registered. This makes is possible to implement… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: reland after bogus revert of r175971 Created 7 years, 10 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 2939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 // must be handled by the browser process so that the correct bindings and 2950 // must be handled by the browser process so that the correct bindings and
2951 // data sources can be registered. 2951 // data sources can be registered.
2952 // Similarly, navigations to view-source URLs or within ViewSource mode 2952 // Similarly, navigations to view-source URLs or within ViewSource mode
2953 // must be handled by the browser process (except for reloads - those are 2953 // must be handled by the browser process (except for reloads - those are
2954 // safe to leave within the renderer). 2954 // safe to leave within the renderer).
2955 // Lastly, access to file:// URLs from non-file:// URL pages must be 2955 // Lastly, access to file:// URLs from non-file:// URL pages must be
2956 // handled by the browser so that ordinary renderer processes don't get 2956 // handled by the browser so that ordinary renderer processes don't get
2957 // blessed with file permissions. 2957 // blessed with file permissions.
2958 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); 2958 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
2959 bool is_initial_navigation = page_id_ == -1; 2959 bool is_initial_navigation = page_id_ == -1;
2960 bool should_fork = 2960 bool should_fork = HasWebUIScheme(url) ||
2961 GetContentClient()->HasWebUIScheme(url) ||
2962 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || 2961 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
2963 url.SchemeIs(chrome::kViewSourceScheme) || 2962 url.SchemeIs(chrome::kViewSourceScheme) ||
2964 (frame->isViewSourceModeEnabled() && 2963 (frame->isViewSourceModeEnabled() &&
2965 type != WebKit::WebNavigationTypeReload); 2964 type != WebKit::WebNavigationTypeReload);
2966 2965
2967 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) { 2966 if (!should_fork && url.SchemeIs(chrome::kFileScheme)) {
2968 // Fork non-file to file opens. Check the opener URL if this is the 2967 // Fork non-file to file opens. Check the opener URL if this is the
2969 // initial navigation in a newly opened window. 2968 // initial navigation in a newly opened window.
2970 GURL source_url(old_url); 2969 GURL source_url(old_url);
2971 if (is_initial_navigation && source_url.is_empty() && frame->opener()) 2970 if (is_initial_navigation && source_url.is_empty() && frame->opener())
(...skipping 3613 matching lines...) Expand 10 before | Expand all | Expand 10 after
6585 } 6584 }
6586 #endif 6585 #endif
6587 6586
6588 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6587 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6589 TransportDIB::Handle dib_handle) { 6588 TransportDIB::Handle dib_handle) {
6590 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6589 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6591 RenderProcess::current()->ReleaseTransportDIB(dib); 6590 RenderProcess::current()->ReleaseTransportDIB(dib);
6592 } 6591 }
6593 6592
6594 } // namespace content 6593 } // 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