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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 1185333003: Implement GetSandboxType() on all platforms and implement for all process types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
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/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 17 matching lines...) Expand all
28 #include "content/common/in_process_child_thread_params.h" 28 #include "content/common/in_process_child_thread_params.h"
29 #include "content/common/view_messages.h" 29 #include "content/common/view_messages.h"
30 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
31 #include "content/public/browser/content_browser_client.h" 31 #include "content/public/browser/content_browser_client.h"
32 #include "content/public/browser/render_process_host.h" 32 #include "content/public/browser/render_process_host.h"
33 #include "content/public/browser/render_widget_host_view.h" 33 #include "content/public/browser/render_widget_host_view.h"
34 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" 34 #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
35 #include "content/public/common/content_client.h" 35 #include "content/public/common/content_client.h"
36 #include "content/public/common/content_switches.h" 36 #include "content/public/common/content_switches.h"
37 #include "content/public/common/result_codes.h" 37 #include "content/public/common/result_codes.h"
38 #include "content/public/common/sandbox_type.h"
38 #include "content/public/common/sandboxed_process_launcher_delegate.h" 39 #include "content/public/common/sandboxed_process_launcher_delegate.h"
39 #include "gpu/command_buffer/service/gpu_switches.h" 40 #include "gpu/command_buffer/service/gpu_switches.h"
40 #include "ipc/ipc_channel_handle.h" 41 #include "ipc/ipc_channel_handle.h"
41 #include "ipc/ipc_switches.h" 42 #include "ipc/ipc_switches.h"
42 #include "ipc/message_filter.h" 43 #include "ipc/message_filter.h"
43 #include "media/base/media_switches.h" 44 #include "media/base/media_switches.h"
44 #include "ui/base/ui_base_switches.h" 45 #include "ui/base/ui_base_switches.h"
45 #include "ui/events/latency_info.h" 46 #include "ui/events/latency_info.h"
46 #include "ui/gl/gl_switches.h" 47 #include "ui/gl/gl_switches.h"
47 48
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return; 258 return;
258 } 259 }
259 } 260 }
260 } 261 }
261 } 262 }
262 #elif defined(OS_POSIX) 263 #elif defined(OS_POSIX)
263 264
264 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); } 265 base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); }
265 #endif // OS_WIN 266 #endif // OS_WIN
266 267
268 SandboxType GetSandboxType() override {
269 return SANDBOX_TYPE_GPU;
270 }
271
267 private: 272 private:
268 #if defined(OS_WIN) 273 #if defined(OS_WIN)
269 base::CommandLine* cmd_line_; 274 base::CommandLine* cmd_line_;
270 #elif defined(OS_POSIX) 275 #elif defined(OS_POSIX)
271 base::ScopedFD ipc_fd_; 276 base::ScopedFD ipc_fd_;
272 #endif // OS_WIN 277 #endif // OS_WIN
273 }; 278 };
274 279
275 } // anonymous namespace 280 } // anonymous namespace
276 281
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1118 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1114 ClientIdToShaderCacheMap::iterator iter = 1119 ClientIdToShaderCacheMap::iterator iter =
1115 client_id_to_shader_cache_.find(client_id); 1120 client_id_to_shader_cache_.find(client_id);
1116 // If the cache doesn't exist then this is an off the record profile. 1121 // If the cache doesn't exist then this is an off the record profile.
1117 if (iter == client_id_to_shader_cache_.end()) 1122 if (iter == client_id_to_shader_cache_.end())
1118 return; 1123 return;
1119 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1124 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1120 } 1125 }
1121 1126
1122 } // namespace content 1127 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698