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

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

Issue 10920084: don't display platform app resources in normal browser windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot to add Created 8 years, 2 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
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 "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 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 const GURL& url, 803 const GURL& url,
804 GURL* new_url) { 804 GURL* new_url) {
805 // Check whether the request should be allowed. If not allowed, we reset the 805 // Check whether the request should be allowed. If not allowed, we reset the
806 // URL to something invalid to prevent the request and cause an error. 806 // URL to something invalid to prevent the request and cause an error.
807 if (url.SchemeIs(chrome::kExtensionScheme) && 807 if (url.SchemeIs(chrome::kExtensionScheme) &&
808 !extensions::ResourceRequestPolicy::CanRequestResource( 808 !extensions::ResourceRequestPolicy::CanRequestResource(
809 url, 809 url,
810 frame, 810 frame,
811 transition_type, 811 transition_type,
812 extension_dispatcher_->extensions())) { 812 extension_dispatcher_->extensions())) {
813 *new_url = GURL("chrome-extension://invalid/"); 813 *new_url = GURL(chrome::kExtensionInvalidRequestURL);
814 return true; 814 return true;
815 815
816 } 816 }
817 817
818 if (url.SchemeIs(chrome::kExtensionResourceScheme) && 818 if (url.SchemeIs(chrome::kExtensionResourceScheme) &&
819 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme( 819 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme(
820 url, 820 url,
821 frame)) { 821 frame)) {
822 *new_url = GURL("chrome-extension-resource://invalid/"); 822 *new_url = GURL(chrome::kExtensionResourceInvalidRequestURL);
823 return true; 823 return true;
824 } 824 }
825 825
826 return false; 826 return false;
827 } 827 }
828 828
829 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() { 829 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() {
830 // We no longer pump messages, even under Chrome Frame. We rely on cookie 830 // We no longer pump messages, even under Chrome Frame. We rely on cookie
831 // read requests handled by CF not putting up UI or causing other actions 831 // read requests handled by CF not putting up UI or causing other actions
832 // that would require us to pump messages. This fixes http://crbug.com/110090. 832 // that would require us to pump messages. This fixes http://crbug.com/110090.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 973 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
974 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 974 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
975 } 975 }
976 976
977 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 977 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
978 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 978 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
979 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 979 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
980 } 980 }
981 981
982 } // namespace chrome 982 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/url_constants.cc ('k') | chrome/test/data/extensions/api_test/get_channel_id/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698