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

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

Issue 10990038: Grant popup blocker bypass based upon extension context type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.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 "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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 718 }
719 } 719 }
720 720
721 bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { 721 bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
722 return !extension_dispatcher_->is_extension_process(); 722 return !extension_dispatcher_->is_extension_process();
723 } 723 }
724 724
725 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) { 725 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) {
726 extensions::ChromeV8Context* current_context = 726 extensions::ChromeV8Context* current_context =
727 extension_dispatcher_->v8_context_set().GetCurrent(); 727 extension_dispatcher_->v8_context_set().GetCurrent();
728 return current_context && current_context->extension(); 728 return current_context && current_context->extension() &&
729 (current_context->context_type() ==
730 extensions::Feature::BLESSED_EXTENSION_CONTEXT ||
731 current_context->context_type() ==
732 extensions::Feature::CONTENT_SCRIPT_CONTEXT);
729 } 733 }
730 734
731 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, 735 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame,
732 const GURL& url, 736 const GURL& url,
733 bool is_initial_navigation, 737 bool is_initial_navigation,
734 bool* send_referrer) { 738 bool* send_referrer) {
735 DCHECK(!frame->parent()); 739 DCHECK(!frame->parent());
736 740
737 // If |url| matches one of the prerendered URLs, stop this navigation and try 741 // If |url| matches one of the prerendered URLs, stop this navigation and try
738 // to swap in the prerendered page on the browser process. If the prerendered 742 // to swap in the prerendered page on the browser process. If the prerendered
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 963 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
960 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 964 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
961 } 965 }
962 966
963 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 967 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
964 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 968 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
965 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 969 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
966 } 970 }
967 971
968 } // namespace chrome 972 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698