| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/renderer_main_platform_delegate.h" | 5 #include "chrome/renderer/renderer_main_platform_delegate.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 "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/test/injection_test_dll.h" | 12 #include "chrome/test/injection_test_dll.h" |
| 13 #include "gfx/native_theme_win.h" | |
| 14 #include "sandbox/src/sandbox.h" | 13 #include "sandbox/src/sandbox.h" |
| 14 #include "ui/gfx/native_theme_win.h" |
| 15 #include "unicode/timezone.h" | 15 #include "unicode/timezone.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // In order to have Theme support, we need to connect to the theme service. | 19 // In order to have Theme support, we need to connect to the theme service. |
| 20 // This needs to be done before we lock down the renderer. Officially this | 20 // This needs to be done before we lock down the renderer. Officially this |
| 21 // can be done with OpenThemeData() but it fails unless you pass a valid | 21 // can be done with OpenThemeData() but it fails unless you pass a valid |
| 22 // window at least the first time. Interestingly, the very act of creating a | 22 // window at least the first time. Interestingly, the very act of creating a |
| 23 // window also sets the connection to the theme service. | 23 // window also sets the connection to the theme service. |
| 24 void EnableThemeSupportForRenderer(bool no_sandbox) { | 24 void EnableThemeSupportForRenderer(bool no_sandbox) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 kRenderTestCall)); | 133 kRenderTestCall)); |
| 134 DCHECK(run_security_tests); | 134 DCHECK(run_security_tests); |
| 135 if (run_security_tests) { | 135 if (run_security_tests) { |
| 136 int test_count = 0; | 136 int test_count = 0; |
| 137 DVLOG(1) << "Running renderer security tests"; | 137 DVLOG(1) << "Running renderer security tests"; |
| 138 BOOL result = run_security_tests(&test_count); | 138 BOOL result = run_security_tests(&test_count); |
| 139 CHECK(result) << "Test number " << test_count << " has failed."; | 139 CHECK(result) << "Test number " << test_count << " has failed."; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 } | 142 } |
| OLD | NEW |