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