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

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

Issue 671573002: Fix disable_nacl=0 build for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable all extension-related header file inclusions unless ENABLE_EXTENSIONS Created 6 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
« no previous file with comments | « chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; 697 ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported;
698 } 698 }
699 #endif 699 #endif
700 700
701 switch (status_value) { 701 switch (status_value) {
702 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { 702 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: {
703 NOTREACHED(); 703 NOTREACHED();
704 break; 704 break;
705 } 705 }
706 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { 706 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: {
707 #if !defined(DISABLE_NACL) 707 #if !defined(DISABLE_NACL) && defined(ENABLE_EXTENSIONS)
708 const bool is_nacl_plugin = 708 const bool is_nacl_plugin =
709 plugin.name == ASCIIToUTF16(nacl::kNaClPluginName); 709 plugin.name == ASCIIToUTF16(nacl::kNaClPluginName);
710 const bool is_nacl_mime_type = 710 const bool is_nacl_mime_type =
711 actual_mime_type == nacl::kNaClPluginMimeType; 711 actual_mime_type == nacl::kNaClPluginMimeType;
712 const bool is_pnacl_mime_type = 712 const bool is_pnacl_mime_type =
713 actual_mime_type == nacl::kPnaclPluginMimeType; 713 actual_mime_type == nacl::kPnaclPluginMimeType;
714 if (is_nacl_plugin || is_nacl_mime_type || is_pnacl_mime_type) { 714 if (is_nacl_plugin || is_nacl_mime_type || is_pnacl_mime_type) {
715 bool is_nacl_unrestricted = false; 715 bool is_nacl_unrestricted = false;
716 if (is_nacl_mime_type) { 716 if (is_nacl_mime_type) {
717 is_nacl_unrestricted = 717 is_nacl_unrestricted =
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 group_name, 762 group_name,
763 IDR_BLOCKED_PLUGIN_HTML, 763 IDR_BLOCKED_PLUGIN_HTML,
764 #if defined(OS_CHROMEOS) 764 #if defined(OS_CHROMEOS)
765 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); 765 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED));
766 #else 766 #else
767 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 767 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
768 #endif 768 #endif
769 break; 769 break;
770 } 770 }
771 } 771 }
772 #endif // !defined(DISABLE_NACL) 772 #endif // !defined(DISABLE_NACL) && defined(ENABLE_EXTENSIONS)
773 773
774 // Delay loading plugins if prerendering. 774 // Delay loading plugins if prerendering.
775 // TODO(mmenke): In the case of prerendering, feed into 775 // TODO(mmenke): In the case of prerendering, feed into
776 // ChromeContentRendererClient::CreatePlugin instead, to 776 // ChromeContentRendererClient::CreatePlugin instead, to
777 // reduce the chance of future regressions. 777 // reduce the chance of future regressions.
778 if (prerender::PrerenderHelper::IsPrerendering(render_frame)) { 778 if (prerender::PrerenderHelper::IsPrerendering(render_frame)) {
779 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin( 779 placeholder = ChromePluginPlaceholder::CreateBlockedPlugin(
780 render_frame, 780 render_frame,
781 frame, 781 frame,
782 params, 782 params,
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 content::BrowserPluginDelegate* 1571 content::BrowserPluginDelegate*
1572 ChromeContentRendererClient::CreateBrowserPluginDelegate( 1572 ChromeContentRendererClient::CreateBrowserPluginDelegate(
1573 content::RenderFrame* render_frame, 1573 content::RenderFrame* render_frame,
1574 const std::string& mime_type) { 1574 const std::string& mime_type) {
1575 #if defined(ENABLE_EXTENSIONS) 1575 #if defined(ENABLE_EXTENSIONS)
1576 return new extensions::GuestViewContainer(render_frame, mime_type); 1576 return new extensions::GuestViewContainer(render_frame, mime_type);
1577 #else 1577 #else
1578 return NULL; 1578 return NULL;
1579 #endif 1579 #endif
1580 } 1580 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698