| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 url, policy_url, mime_type, &path, actual_mime_type)); | 2286 url, policy_url, mime_type, &path, actual_mime_type)); |
| 2287 if (path.value().empty()) | 2287 if (path.value().empty()) |
| 2288 return NULL; | 2288 return NULL; |
| 2289 | 2289 |
| 2290 const std::string* mime_type_to_use; | 2290 const std::string* mime_type_to_use; |
| 2291 if (!actual_mime_type->empty()) | 2291 if (!actual_mime_type->empty()) |
| 2292 mime_type_to_use = actual_mime_type; | 2292 mime_type_to_use = actual_mime_type; |
| 2293 else | 2293 else |
| 2294 mime_type_to_use = &mime_type; | 2294 mime_type_to_use = &mime_type; |
| 2295 | 2295 |
| 2296 if (RenderProcess::current()->in_process_plugins()) { | 2296 bool in_process_plugin = RenderProcess::current()->in_process_plugins(); |
| 2297 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { |
| 2298 if (mime_type == "application/x-nacl-srpc") { |
| 2299 in_process_plugin = true; |
| 2300 } |
| 2301 } |
| 2302 if (in_process_plugin) { |
| 2297 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. | 2303 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. |
| 2298 return WebPluginDelegateImpl::Create( | 2304 return WebPluginDelegateImpl::Create( |
| 2299 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); | 2305 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); |
| 2300 #else | 2306 #else |
| 2301 NOTIMPLEMENTED(); | 2307 NOTIMPLEMENTED(); |
| 2302 return NULL; | 2308 return NULL; |
| 2303 #endif | 2309 #endif |
| 2304 } | 2310 } |
| 2305 | 2311 |
| 2306 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); | 2312 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 // TODO(darin): There's actually no reason for this to be here. We should | 3555 // TODO(darin): There's actually no reason for this to be here. We should |
| 3550 // have the browser side manage the document tag. | 3556 // have the browser side manage the document tag. |
| 3551 #if defined(OS_MACOSX) | 3557 #if defined(OS_MACOSX) |
| 3552 if (!has_document_tag_) { | 3558 if (!has_document_tag_) { |
| 3553 // Make the call to get the tag. | 3559 // Make the call to get the tag. |
| 3554 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_)); | 3560 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_)); |
| 3555 has_document_tag_ = true; | 3561 has_document_tag_ = true; |
| 3556 } | 3562 } |
| 3557 #endif | 3563 #endif |
| 3558 } | 3564 } |
| OLD | NEW |