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/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/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 return false; | 448 return false; |
449 } | 449 } |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
453 ChromeViewHostMsg_GetPluginInfo_Output output; | 453 ChromeViewHostMsg_GetPluginInfo_Output output; |
454 #if defined(ENABLE_PLUGINS) | 454 #if defined(ENABLE_PLUGINS) |
455 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( | 455 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( |
456 render_frame->GetRoutingID(), GURL(params.url), | 456 render_frame->GetRoutingID(), GURL(params.url), |
457 frame->top()->document().url(), orig_mime_type, &output)); | 457 frame->top()->document().url(), orig_mime_type, &output)); |
| 458 #else |
| 459 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; |
| 460 #endif |
458 *plugin = CreatePlugin(render_frame, frame, params, output); | 461 *plugin = CreatePlugin(render_frame, frame, params, output); |
459 return true; | 462 return true; |
460 #else | |
461 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; | |
462 *plugin = NULL; | |
463 return false; | |
464 #endif | |
465 } | 463 } |
466 | 464 |
467 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( | 465 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( |
468 content::RenderFrame* render_frame, | 466 content::RenderFrame* render_frame, |
469 const base::FilePath& plugin_path) { | 467 const base::FilePath& plugin_path) { |
470 ChromePluginPlaceholder* placeholder = | 468 ChromePluginPlaceholder* placeholder = |
471 ChromePluginPlaceholder::CreateErrorPlugin(render_frame, plugin_path); | 469 ChromePluginPlaceholder::CreateErrorPlugin(render_frame, plugin_path); |
472 return placeholder->plugin(); | 470 return placeholder->plugin(); |
473 } | 471 } |
474 | 472 |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1371 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1374 return !command_line->HasSwitch(switches::kExtensionProcess); | 1372 return !command_line->HasSwitch(switches::kExtensionProcess); |
1375 } | 1373 } |
1376 | 1374 |
1377 blink::WebWorkerPermissionClientProxy* | 1375 blink::WebWorkerPermissionClientProxy* |
1378 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1376 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1379 content::RenderFrame* render_frame, | 1377 content::RenderFrame* render_frame, |
1380 blink::WebFrame* frame) { | 1378 blink::WebFrame* frame) { |
1381 return new WorkerPermissionClientProxy(render_frame, frame); | 1379 return new WorkerPermissionClientProxy(render_frame, frame); |
1382 } | 1380 } |
OLD | NEW |