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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 8585016: Don't use process isolation for bookmark apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « chrome/common/extensions/extension_set.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 728
729 void ChromeContentRendererClient::SetExtensionDispatcher( 729 void ChromeContentRendererClient::SetExtensionDispatcher(
730 ExtensionDispatcher* extension_dispatcher) { 730 ExtensionDispatcher* extension_dispatcher) {
731 extension_dispatcher_.reset(extension_dispatcher); 731 extension_dispatcher_.reset(extension_dispatcher);
732 } 732 }
733 733
734 bool ChromeContentRendererClient::CrossesExtensionExtents( 734 bool ChromeContentRendererClient::CrossesExtensionExtents(
735 WebFrame* frame, 735 WebFrame* frame,
736 const GURL& new_url, 736 const GURL& new_url,
737 bool is_initial_navigation) { 737 bool is_initial_navigation) {
738 // Note: ExtensionSet does not return bookmark apps, so they will be
739 // treated like normal web pages from the process model's perspective.
Aaron Boodman 2011/11/17 04:10:25 Can you just check from_bookmark() here instead of
Charlie Reis 2011/11/17 20:27:58 Done.
738 const ExtensionSet* extensions = extension_dispatcher_->extensions(); 740 const ExtensionSet* extensions = extension_dispatcher_->extensions();
741
742 // Determine if the new_url is an extension or hosted app.
739 bool is_extension_url = !!extensions->GetByURL(new_url); 743 bool is_extension_url = !!extensions->GetByURL(new_url);
740 GURL old_url(frame->top()->document().url()); 744 GURL old_url(frame->top()->document().url());
741 745
742 // If old_url is still empty and this is an initial navigation, then this is 746 // If old_url is still empty and this is an initial navigation, then this is
743 // a window.open operation. We should look at the opener URL. 747 // a window.open operation. We should look at the opener URL.
744 if (is_initial_navigation && old_url.is_empty() && frame->opener()) { 748 if (is_initial_navigation && old_url.is_empty() && frame->opener()) {
745 // If we're about to open a normal web page from a same-origin opener stuck 749 // If we're about to open a normal web page from a same-origin opener stuck
746 // in an extension process, we want to keep it in process to allow the 750 // in an extension process, we want to keep it in process to allow the
747 // opener to script it. 751 // opener to script it.
748 GURL opener_url = frame->opener()->document().url(); 752 GURL opener_url = frame->opener()->document().url();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 808 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
805 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 809 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
806 } 810 }
807 811
808 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 812 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
809 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 813 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
810 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 814 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
811 } 815 }
812 816
813 } // namespace chrome 817 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_set.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698