| 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 "content/browser/plugin_process_host.h" | 5 #include "content/browser/plugin_process_host.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
| 10 #include <utility> // for pair<> | 10 #include <utility> // for pair<> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
| 91 virtual bool ShouldSandbox() OVERRIDE { | 91 virtual bool ShouldSandbox() OVERRIDE { |
| 92 return false; | 92 return false; |
| 93 } | 93 } |
| 94 | 94 |
| 95 #elif defined(OS_POSIX) | 95 #elif defined(OS_POSIX) |
| 96 virtual int GetIpcFd() OVERRIDE { | 96 virtual int GetIpcFd() OVERRIDE { |
| 97 return ipc_fd_; | 97 return ipc_fd_; |
| 98 } | 98 } |
| 99 | |
| 100 #if defined(OS_MACOSX) | |
| 101 virtual SandboxType GetSandboxType() OVERRIDE { | |
| 102 return SANDBOX_TYPE_NPAPI; | |
| 103 } | |
| 104 #endif // OS_MACOSX | |
| 105 | |
| 106 #endif // OS_WIN | 99 #endif // OS_WIN |
| 107 | 100 |
| 108 private: | 101 private: |
| 109 #if defined(OS_POSIX) | 102 #if defined(OS_POSIX) |
| 110 int ipc_fd_; | 103 int ipc_fd_; |
| 111 #endif // OS_POSIX | 104 #endif // OS_POSIX |
| 112 | 105 |
| 113 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); | 106 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); |
| 114 }; | 107 }; |
| 115 | 108 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 | 417 |
| 425 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, | 418 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, |
| 426 ResourceContext** resource_context, | 419 ResourceContext** resource_context, |
| 427 net::URLRequestContext** request_context) { | 420 net::URLRequestContext** request_context) { |
| 428 *resource_context = | 421 *resource_context = |
| 429 resource_context_map_[request.origin_pid].resource_context; | 422 resource_context_map_[request.origin_pid].resource_context; |
| 430 *request_context = (*resource_context)->GetRequestContext(); | 423 *request_context = (*resource_context)->GetRequestContext(); |
| 431 } | 424 } |
| 432 | 425 |
| 433 } // namespace content | 426 } // namespace content |
| OLD | NEW |