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

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

Issue 207025: NaCl-Chrome integration (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 url, policy_url, mime_type, &path, actual_mime_type)); 2274 url, policy_url, mime_type, &path, actual_mime_type));
2275 if (path.value().empty()) 2275 if (path.value().empty())
2276 return NULL; 2276 return NULL;
2277 2277
2278 const std::string* mime_type_to_use; 2278 const std::string* mime_type_to_use;
2279 if (!actual_mime_type->empty()) 2279 if (!actual_mime_type->empty())
2280 mime_type_to_use = actual_mime_type; 2280 mime_type_to_use = actual_mime_type;
2281 else 2281 else
2282 mime_type_to_use = &mime_type; 2282 mime_type_to_use = &mime_type;
2283 2283
2284 if (RenderProcess::current()->in_process_plugins()) { 2284 bool in_process_plugin = RenderProcess::current()->in_process_plugins();
2285 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) {
2286 if (mime_type == "application/x-nacl-srpc") {
2287 in_process_plugin = true;
2288 }
2289 }
2290 if (in_process_plugin) {
2285 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. 2291 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac.
2286 return WebPluginDelegateImpl::Create( 2292 return WebPluginDelegateImpl::Create(
2287 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); 2293 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_));
2288 #else 2294 #else
2289 NOTIMPLEMENTED(); 2295 NOTIMPLEMENTED();
2290 return NULL; 2296 return NULL;
2291 #endif 2297 #endif
2292 } 2298 }
2293 2299
2294 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); 2300 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr());
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 // TODO(darin): There's actually no reason for this to be here. We should 3514 // TODO(darin): There's actually no reason for this to be here. We should
3509 // have the browser side manage the document tag. 3515 // have the browser side manage the document tag.
3510 #if defined(OS_MACOSX) 3516 #if defined(OS_MACOSX)
3511 if (!has_document_tag_) { 3517 if (!has_document_tag_) {
3512 // Make the call to get the tag. 3518 // Make the call to get the tag.
3513 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_)); 3519 Send(new ViewHostMsg_GetDocumentTag(routing_id_, &document_tag_));
3514 has_document_tag_ = true; 3520 has_document_tag_ = true;
3515 } 3521 }
3516 #endif 3522 #endif
3517 } 3523 }
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