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 *plugin = CreatePlugin(render_frame, frame, params, output); |
| 459 return true; |
458 #else | 460 #else |
459 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; | 461 output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound; |
| 462 *plugin = NULL; |
| 463 return false; |
460 #endif | 464 #endif |
461 *plugin = CreatePlugin(render_frame, frame, params, output); | |
462 return true; | |
463 } | 465 } |
464 | 466 |
465 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( | 467 WebPlugin* ChromeContentRendererClient::CreatePluginReplacement( |
466 content::RenderFrame* render_frame, | 468 content::RenderFrame* render_frame, |
467 const base::FilePath& plugin_path) { | 469 const base::FilePath& plugin_path) { |
468 ChromePluginPlaceholder* placeholder = | 470 ChromePluginPlaceholder* placeholder = |
469 ChromePluginPlaceholder::CreateErrorPlugin(render_frame, plugin_path); | 471 ChromePluginPlaceholder::CreateErrorPlugin(render_frame, plugin_path); |
470 return placeholder->plugin(); | 472 return placeholder->plugin(); |
471 } | 473 } |
472 | 474 |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1373 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1372 return !command_line->HasSwitch(switches::kExtensionProcess); | 1374 return !command_line->HasSwitch(switches::kExtensionProcess); |
1373 } | 1375 } |
1374 | 1376 |
1375 blink::WebWorkerPermissionClientProxy* | 1377 blink::WebWorkerPermissionClientProxy* |
1376 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1378 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1377 content::RenderFrame* render_frame, | 1379 content::RenderFrame* render_frame, |
1378 blink::WebFrame* frame) { | 1380 blink::WebFrame* frame) { |
1379 return new WorkerPermissionClientProxy(render_frame, frame); | 1381 return new WorkerPermissionClientProxy(render_frame, frame); |
1380 } | 1382 } |
OLD | NEW |