| 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 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 url, policy_url, mime_type, &path, actual_mime_type)); | 2331 url, policy_url, mime_type, &path, actual_mime_type)); |
| 2332 if (path.value().empty()) | 2332 if (path.value().empty()) |
| 2333 return NULL; | 2333 return NULL; |
| 2334 | 2334 |
| 2335 const std::string* mime_type_to_use; | 2335 const std::string* mime_type_to_use; |
| 2336 if (!actual_mime_type->empty()) | 2336 if (!actual_mime_type->empty()) |
| 2337 mime_type_to_use = actual_mime_type; | 2337 mime_type_to_use = actual_mime_type; |
| 2338 else | 2338 else |
| 2339 mime_type_to_use = &mime_type; | 2339 mime_type_to_use = &mime_type; |
| 2340 | 2340 |
| 2341 if (RenderProcess::current()->in_process_plugins()) { | 2341 bool in_process_plugin = RenderProcess::current()->in_process_plugins(); |
| 2342 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { |
| 2343 if (mime_type == "application/x-nacl-srpc") { |
| 2344 in_process_plugin = true; |
| 2345 } |
| 2346 } |
| 2347 if (in_process_plugin) { |
| 2342 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. | 2348 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. |
| 2343 return WebPluginDelegateImpl::Create( | 2349 return WebPluginDelegateImpl::Create( |
| 2344 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); | 2350 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); |
| 2345 #else | 2351 #else |
| 2346 NOTIMPLEMENTED(); | 2352 NOTIMPLEMENTED(); |
| 2347 return NULL; | 2353 return NULL; |
| 2348 #endif | 2354 #endif |
| 2349 } | 2355 } |
| 2350 | 2356 |
| 2351 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); | 2357 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3571 modal_dialog_event_->Signal(); | 3577 modal_dialog_event_->Signal(); |
| 3572 | 3578 |
| 3573 message->EnableMessagePumping(); // Runs a nested message loop. | 3579 message->EnableMessagePumping(); // Runs a nested message loop. |
| 3574 bool rv = Send(message); | 3580 bool rv = Send(message); |
| 3575 | 3581 |
| 3576 if (--modal_dialog_count_ == 0) | 3582 if (--modal_dialog_count_ == 0) |
| 3577 modal_dialog_event_->Reset(); | 3583 modal_dialog_event_->Reset(); |
| 3578 | 3584 |
| 3579 return rv; | 3585 return rv; |
| 3580 } | 3586 } |
| OLD | NEW |