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

Side by Side Diff: content/renderer/pepper/content_renderer_pepper_host_factory.cc

Issue 2411483002: Enable win32k lockdown for ppapi processes. (Closed)
Patch Set: readd entry Created 4 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
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/renderer/pepper/content_renderer_pepper_host_factory.h" 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ppapi::PPB_ImageData_Shared::ImageDataType image_type = 157 ppapi::PPB_ImageData_Shared::ImageDataType image_type =
158 ppapi::PPB_ImageData_Shared::PLATFORM; 158 ppapi::PPB_ImageData_Shared::PLATFORM;
159 #if defined(OS_WIN) 159 #if defined(OS_WIN)
160 // If Win32K lockdown mitigations are enabled for Windows 8 and beyond 160 // If Win32K lockdown mitigations are enabled for Windows 8 and beyond
161 // we use the SIMPLE image data type as the PLATFORM image data type 161 // we use the SIMPLE image data type as the PLATFORM image data type
162 // calls GDI functions to create DIB sections etc which fail in Win32K 162 // calls GDI functions to create DIB sections etc which fail in Win32K
163 // lockdown mode. 163 // lockdown mode.
164 // TODO(ananta) 164 // TODO(ananta)
165 // Look into whether this causes a loss of functionality. From cursory 165 // Look into whether this causes a loss of functionality. From cursory
166 // testing things seem to work well. 166 // testing things seem to work well.
167 if (IsWin32kRendererLockdownEnabled()) 167 if (IsWin32kLockdownEnabled())
168 image_type = ppapi::PPB_ImageData_Shared::SIMPLE; 168 image_type = ppapi::PPB_ImageData_Shared::SIMPLE;
169 #endif 169 #endif
170 scoped_refptr<PPB_ImageData_Impl> image_data(new PPB_ImageData_Impl( 170 scoped_refptr<PPB_ImageData_Impl> image_data(new PPB_ImageData_Impl(
171 instance, image_type)); 171 instance, image_type));
172 return base::WrapUnique(PepperGraphics2DHost::Create( 172 return base::WrapUnique(PepperGraphics2DHost::Create(
173 host_, instance, resource, size, is_always_opaque, image_data)); 173 host_, instance, resource, size, is_always_opaque, image_data));
174 } 174 }
175 case PpapiHostMsg_URLLoader_Create::ID: 175 case PpapiHostMsg_URLLoader_Create::ID:
176 return base::MakeUnique<PepperURLLoaderHost>(host_, false, instance, 176 return base::MakeUnique<PepperURLLoaderHost>(host_, false, instance,
177 resource); 177 resource);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 return nullptr; 235 return nullptr;
236 } 236 }
237 237
238 const ppapi::PpapiPermissions& 238 const ppapi::PpapiPermissions&
239 ContentRendererPepperHostFactory::GetPermissions() const { 239 ContentRendererPepperHostFactory::GetPermissions() const {
240 return host_->GetPpapiHost()->permissions(); 240 return host_->GetPpapiHost()->permissions();
241 } 241 }
242 242
243 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/pepper/resource_creation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698