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 |
99 #endif // OS_WIN | 106 #endif // OS_WIN |
100 | 107 |
101 private: | 108 private: |
102 #if defined(OS_POSIX) | 109 #if defined(OS_POSIX) |
103 int ipc_fd_; | 110 int ipc_fd_; |
104 #endif // OS_POSIX | 111 #endif // OS_POSIX |
105 | 112 |
106 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); | 113 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); |
107 }; | 114 }; |
108 | 115 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 425 |
419 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, | 426 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, |
420 ResourceContext** resource_context, | 427 ResourceContext** resource_context, |
421 net::URLRequestContext** request_context) { | 428 net::URLRequestContext** request_context) { |
422 *resource_context = | 429 *resource_context = |
423 resource_context_map_[request.origin_pid].resource_context; | 430 resource_context_map_[request.origin_pid].resource_context; |
424 *request_context = (*resource_context)->GetRequestContext(); | 431 *request_context = (*resource_context)->GetRequestContext(); |
425 } | 432 } |
426 | 433 |
427 } // namespace content | 434 } // namespace content |
OLD | NEW |