Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Side by Side Diff: chrome/renderer/render_view.cc

Issue 153002: NaCl-Chrome integration - step 1 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_process.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_process.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698