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/renderer/pepper/resource_creation_impl.h" | 5 #include "content/renderer/pepper/resource_creation_impl.h" |
6 | 6 |
7 #include "content/renderer/pepper/ppb_audio_impl.h" | 7 #include "content/renderer/pepper/ppb_audio_impl.h" |
8 #include "content/renderer/pepper/ppb_broker_impl.h" | 8 #include "content/renderer/pepper/ppb_broker_impl.h" |
9 #include "content/renderer/pepper/ppb_buffer_impl.h" | 9 #include "content/renderer/pepper/ppb_buffer_impl.h" |
10 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" | 10 #include "content/renderer/pepper/ppb_flash_message_loop_impl.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 const PP_Size* size, | 133 const PP_Size* size, |
134 PP_Bool init_to_zero) { | 134 PP_Bool init_to_zero) { |
135 #if defined(OS_WIN) | 135 #if defined(OS_WIN) |
136 // If Win32K lockdown mitigations are enabled for Windows 8 and beyond, | 136 // If Win32K lockdown mitigations are enabled for Windows 8 and beyond, |
137 // we use the SIMPLE image data type as the PLATFORM image data type | 137 // we use the SIMPLE image data type as the PLATFORM image data type |
138 // calls GDI functions to create DIB sections etc which fail in Win32K | 138 // calls GDI functions to create DIB sections etc which fail in Win32K |
139 // lockdown mode. | 139 // lockdown mode. |
140 // TODO(ananta) | 140 // TODO(ananta) |
141 // Look into whether this causes a loss of functionality. From cursory | 141 // Look into whether this causes a loss of functionality. From cursory |
142 // testing things seem to work well. | 142 // testing things seem to work well. |
143 if (CommandLine::ForCurrentProcess()->HasSwitch( | 143 if (switches::IsWin32kRendererLockdownEnabled() && |
144 switches::kEnableWin32kRendererLockDown) && | |
145 base::win::GetVersion() >= base::win::VERSION_WIN8) { | 144 base::win::GetVersion() >= base::win::VERSION_WIN8) { |
146 return CreateImageDataSimple(instance, format, size, init_to_zero); | 145 return CreateImageDataSimple(instance, format, size, init_to_zero); |
147 } | 146 } |
148 #endif | 147 #endif |
149 return PPB_ImageData_Impl::Create(instance, | 148 return PPB_ImageData_Impl::Create(instance, |
150 ppapi::PPB_ImageData_Shared::PLATFORM, | 149 ppapi::PPB_ImageData_Shared::PLATFORM, |
151 format, | 150 format, |
152 *size, | 151 *size, |
153 init_to_zero); | 152 init_to_zero); |
154 } | 153 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 wheel_ticks, | 359 wheel_ticks, |
361 scroll_by_page); | 360 scroll_by_page); |
362 } | 361 } |
363 | 362 |
364 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( | 363 PP_Resource ResourceCreationImpl::CreateX509CertificatePrivate( |
365 PP_Instance instance) { | 364 PP_Instance instance) { |
366 return 0; // Not supported in-process. | 365 return 0; // Not supported in-process. |
367 } | 366 } |
368 | 367 |
369 } // namespace content | 368 } // namespace content |
OLD | NEW |