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

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

Issue 23530029: Support webview tag when the container extension is embedded in a webUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary lines from document_custom_bindings Created 7 years, 3 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 std::string ChromeContentRendererClient::GetDefaultEncoding() { 408 std::string ChromeContentRendererClient::GetDefaultEncoding() {
409 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); 409 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING);
410 } 410 }
411 411
412 const Extension* ChromeContentRendererClient::GetExtension( 412 const Extension* ChromeContentRendererClient::GetExtension(
413 const WebSecurityOrigin& origin) const { 413 const WebSecurityOrigin& origin) const {
414 if (!EqualsASCII(origin.protocol(), extensions::kExtensionScheme)) 414 if (!EqualsASCII(origin.protocol(), extensions::kExtensionScheme))
415 return NULL; 415 return NULL;
416 416
417 const std::string extension_id = origin.host().utf8().data(); 417 const std::string extension_id = origin.host().utf8().data();
418 if (!extension_dispatcher_->IsExtensionActive(extension_id))
Charlie Reis 2013/09/13 21:17:24 Why is this being removed?
guohui 2013/09/16 22:27:02 This check requires the extension to be active in
Charlie Reis 2013/09/18 17:42:23 This is a very general sounding method (GetExtensi
guohui 2013/09/19 13:48:41 Done.
419 return NULL;
420
421 return extension_dispatcher_->extensions()->GetByID(extension_id); 418 return extension_dispatcher_->extensions()->GetByID(extension_id);
422 } 419 }
423 420
424 bool ChromeContentRendererClient::OverrideCreatePlugin( 421 bool ChromeContentRendererClient::OverrideCreatePlugin(
425 content::RenderView* render_view, 422 content::RenderView* render_view,
426 WebFrame* frame, 423 WebFrame* frame,
427 const WebPluginParams& params, 424 const WebPluginParams& params,
428 WebPlugin** plugin) { 425 WebPlugin** plugin) {
429 std::string orig_mime_type = params.mimeType.utf8(); 426 std::string orig_mime_type = params.mimeType.utf8();
430 if (orig_mime_type == content::kBrowserPluginMimeType) { 427 if (orig_mime_type == content::kBrowserPluginMimeType) {
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 // SiteIsolationPolicy is off by default. We would like to activate cross-site 1306 // SiteIsolationPolicy is off by default. We would like to activate cross-site
1310 // document blocking (for UMA data collection) for normal renderer processes 1307 // document blocking (for UMA data collection) for normal renderer processes
1311 // running a normal web page from the Internet. We only turn on 1308 // running a normal web page from the Internet. We only turn on
1312 // SiteIsolationPolicy for a renderer process that does not have the extension 1309 // SiteIsolationPolicy for a renderer process that does not have the extension
1313 // flag on. 1310 // flag on.
1314 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1311 CommandLine* command_line = CommandLine::ForCurrentProcess();
1315 return !command_line->HasSwitch(switches::kExtensionProcess); 1312 return !command_line->HasSwitch(switches::kExtensionProcess);
1316 } 1313 }
1317 1314
1318 } // namespace chrome 1315 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698