OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ppb_gpu_blacklist_private_impl.h" | 5 #include "content/renderer/pepper/ppb_gpu_blacklist_private_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "webkit/plugins/plugin_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 | 10 |
11 // todo(nfullagar): Remove this private interface when the SRPC proxy is | 11 // todo(nfullagar): Remove this private interface when the SRPC proxy is |
12 // permanently disabled. | 12 // permanently disabled. |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 PP_Bool IsGpuBlacklisted() { | 18 PP_Bool IsGpuBlacklisted() { |
19 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 19 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
20 if (command_line) | 20 if (command_line) |
21 return PP_FromBool( | 21 return PP_FromBool( |
22 command_line->HasSwitch(switches::kDisablePepper3d)); | 22 command_line->HasSwitch(switches::kDisablePepper3d)); |
23 return PP_TRUE; | 23 return PP_TRUE; |
24 } | 24 } |
25 | 25 |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 const PPB_GpuBlacklist_Private ppb_gpu_blacklist = { | 28 const PPB_GpuBlacklist_Private ppb_gpu_blacklist = { |
29 &IsGpuBlacklisted, | 29 &IsGpuBlacklisted, |
30 }; | 30 }; |
31 | 31 |
32 // static | 32 // static |
33 const PPB_GpuBlacklist_Private* PPB_GpuBlacklist_Private_Impl::GetInterface() { | 33 const PPB_GpuBlacklist_Private* PPB_GpuBlacklist_Private_Impl::GetInterface() { |
34 return &ppb_gpu_blacklist; | 34 return &ppb_gpu_blacklist; |
35 } | 35 } |
36 | 36 |
37 } // namespace content | 37 } // namespace content |
38 | 38 |
OLD | NEW |