| 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 #endif | 571 #endif |
| 572 | 572 |
| 573 switch (status_value) { | 573 switch (status_value) { |
| 574 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { | 574 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { |
| 575 NOTREACHED(); | 575 NOTREACHED(); |
| 576 break; | 576 break; |
| 577 } | 577 } |
| 578 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { | 578 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { |
| 579 const char* kPnaclMimeType = "application/x-pnacl"; | 579 const char* kPnaclMimeType = "application/x-pnacl"; |
| 580 if (actual_mime_type == kPnaclMimeType) { | 580 if (actual_mime_type == kPnaclMimeType) { |
| 581 if (CommandLine::ForCurrentProcess()->HasSwitch( | 581 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 582 switches::kDisablePnacl)) { | 582 switches::kEnablePnacl)) { |
| 583 frame->addMessageToConsole( | 583 frame->addMessageToConsole( |
| 584 WebConsoleMessage( | 584 WebConsoleMessage( |
| 585 WebConsoleMessage::LevelError, | 585 WebConsoleMessage::LevelError, |
| 586 "Portable Native Client must not be disabled in" | 586 "Portable Native Client must be enabled in about:flags.")); |
| 587 " about:flags.")); | |
| 588 placeholder = PluginPlaceholder::CreateBlockedPlugin( | 587 placeholder = PluginPlaceholder::CreateBlockedPlugin( |
| 589 render_view, frame, params, plugin, identifier, group_name, | 588 render_view, frame, params, plugin, identifier, group_name, |
| 590 IDR_BLOCKED_PLUGIN_HTML, | 589 IDR_BLOCKED_PLUGIN_HTML, |
| 591 #if defined(OS_CHROMEOS) | 590 #if defined(OS_CHROMEOS) |
| 592 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); | 591 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); |
| 593 #else | 592 #else |
| 594 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); | 593 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); |
| 595 #endif | 594 #endif |
| 596 break; | 595 break; |
| 597 } | 596 } |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1297 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1299 switches::kEnablePepperTesting)) { | 1298 switches::kEnablePepperTesting)) { |
| 1300 return true; | 1299 return true; |
| 1301 } | 1300 } |
| 1302 #endif // !defined(OS_ANDROID) | 1301 #endif // !defined(OS_ANDROID) |
| 1303 return false; | 1302 return false; |
| 1304 } | 1303 } |
| 1305 | 1304 |
| 1306 | 1305 |
| 1307 } // namespace chrome | 1306 } // namespace chrome |
| OLD | NEW |