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 "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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 #endif | 563 #endif |
564 | 564 |
565 switch (status_value) { | 565 switch (status_value) { |
566 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { | 566 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { |
567 NOTREACHED(); | 567 NOTREACHED(); |
568 break; | 568 break; |
569 } | 569 } |
570 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { | 570 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { |
571 const char* kPnaclMimeType = "application/x-pnacl"; | 571 const char* kPnaclMimeType = "application/x-pnacl"; |
572 if (actual_mime_type == kPnaclMimeType) { | 572 if (actual_mime_type == kPnaclMimeType) { |
573 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 573 if (CommandLine::ForCurrentProcess()->HasSwitch( |
574 switches::kEnablePnacl)) { | 574 switches::kDisablePnacl)) { |
575 frame->addMessageToConsole( | 575 frame->addMessageToConsole( |
576 WebConsoleMessage( | 576 WebConsoleMessage( |
577 WebConsoleMessage::LevelError, | 577 WebConsoleMessage::LevelError, |
578 "Portable Native Client must be enabled in about:flags.")); | 578 "Portable Native Client must not be disabled in" |
| 579 " about:flags.")); |
579 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 580 placeholder = PluginPlaceholder::CreateBlockedPlugin( |
580 render_view, frame, params, plugin, identifier, group_name, | 581 render_view, frame, params, plugin, identifier, group_name, |
581 IDR_BLOCKED_PLUGIN_HTML, | 582 IDR_BLOCKED_PLUGIN_HTML, |
582 #if defined(OS_CHROMEOS) | 583 #if defined(OS_CHROMEOS) |
583 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); | 584 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); |
584 #else | 585 #else |
585 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); | 586 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
586 #endif | 587 #endif |
587 break; | 588 break; |
588 } | 589 } |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1282 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1282 switches::kEnablePepperTesting)) { | 1283 switches::kEnablePepperTesting)) { |
1283 return true; | 1284 return true; |
1284 } | 1285 } |
1285 #endif // !defined(OS_ANDROID) | 1286 #endif // !defined(OS_ANDROID) |
1286 return false; | 1287 return false; |
1287 } | 1288 } |
1288 | 1289 |
1289 | 1290 |
1290 } // namespace chrome | 1291 } // namespace chrome |
OLD | NEW |