| OLD | NEW |
| 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 "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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, | 688 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, |
| 689 const GURL& url, | 689 const GURL& url, |
| 690 bool is_initial_navigation, | 690 bool is_initial_navigation, |
| 691 bool* send_referrer) { | 691 bool* send_referrer) { |
| 692 DCHECK(!frame->parent()); | 692 DCHECK(!frame->parent()); |
| 693 | 693 |
| 694 // If |url| matches one of the prerendered URLs, stop this navigation and try | 694 // If |url| matches one of the prerendered URLs, stop this navigation and try |
| 695 // to swap in the prerendered page on the browser process. If the prerendered | 695 // to swap in the prerendered page on the browser process. If the prerendered |
| 696 // page no longer exists by the time the OpenURL IPC is handled, a normal | 696 // page no longer exists by the time the OpenURL IPC is handled, a normal |
| 697 // navigation is attempted. | 697 // navigation is attempted. |
| 698 if (prerender_dispatcher_.get() && prerender_dispatcher_->IsPrerenderURL(url)) | 698 if (prerender_dispatcher_.get() && |
| 699 prerender_dispatcher_->IsPrerenderURL(url)) { |
| 699 return true; | 700 return true; |
| 701 } |
| 700 | 702 |
| 701 const ExtensionSet* extensions = extension_dispatcher_->extensions(); | 703 const ExtensionSet* extensions = extension_dispatcher_->extensions(); |
| 702 | 704 |
| 703 // Determine if the new URL is an extension (excluding bookmark apps). | 705 // Determine if the new URL is an extension (excluding bookmark apps). |
| 704 const Extension* new_url_extension = extensions::GetNonBookmarkAppExtension( | 706 const Extension* new_url_extension = extensions::GetNonBookmarkAppExtension( |
| 705 *extensions, ExtensionURLInfo(url)); | 707 *extensions, ExtensionURLInfo(url)); |
| 706 bool is_extension_url = !!new_url_extension; | 708 bool is_extension_url = !!new_url_extension; |
| 707 | 709 |
| 708 // If the navigation would cross an app extent boundary, we also need | 710 // If the navigation would cross an app extent boundary, we also need |
| 709 // to defer to the browser to ensure process isolation. | 711 // to defer to the browser to ensure process isolation. |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 902 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
| 901 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 903 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
| 902 } | 904 } |
| 903 | 905 |
| 904 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 906 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
| 905 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 907 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
| 906 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 908 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
| 907 } | 909 } |
| 908 | 910 |
| 909 } // namespace chrome | 911 } // namespace chrome |
| OLD | NEW |