OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "webkit/tools/test_shell/test_shell.h" | 5 #include "webkit/tools/test_shell/test_shell.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <commdlg.h> | 9 #include <commdlg.h> |
10 #include <objbase.h> | 10 #include <objbase.h> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Register the Ahem font used by layout tests. | 144 // Register the Ahem font used by layout tests. |
145 DWORD num_fonts = 1; | 145 DWORD num_fonts = 1; |
146 void* font_ptr; | 146 void* font_ptr; |
147 size_t font_size; | 147 size_t font_size; |
148 if (base::GetDataResourceFromModule(::GetModuleHandle(NULL), IDR_AHEM_FONT, | 148 if (base::GetDataResourceFromModule(::GetModuleHandle(NULL), IDR_AHEM_FONT, |
149 &font_ptr, &font_size)) { | 149 &font_ptr, &font_size)) { |
150 HANDLE rc = AddFontMemResourceEx(font_ptr, font_size, 0, &num_fonts); | 150 HANDLE rc = AddFontMemResourceEx(font_ptr, font_size, 0, &num_fonts); |
151 DCHECK(rc != 0); | 151 DCHECK(rc != 0); |
152 } | 152 } |
153 | 153 |
154 CommandLine parsed_command_line; | 154 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
155 if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) { | 155 if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) { |
156 std::wstring dir( | 156 std::wstring dir( |
157 parsed_command_line.GetSwitchValue(test_shell::kCrashDumps)); | 157 parsed_command_line.GetSwitchValue(test_shell::kCrashDumps)); |
158 new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true); | 158 new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true); |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) { | 162 void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) { |
163 // Do we want to tear down some of the machinery behind the scenes too? | 163 // Do we want to tear down some of the machinery behind the scenes too? |
164 RemoveWindowFromList(windowHandle); | 164 RemoveWindowFromList(windowHandle); |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 731 |
732 bool EnsureFontLoaded(HFONT font) { | 732 bool EnsureFontLoaded(HFONT font) { |
733 return true; | 733 return true; |
734 } | 734 } |
735 | 735 |
736 bool DownloadUrl(const std::string& url, HWND caller_window) { | 736 bool DownloadUrl(const std::string& url, HWND caller_window) { |
737 return false; | 737 return false; |
738 } | 738 } |
739 | 739 |
740 } // namespace webkit_glue | 740 } // namespace webkit_glue |
OLD | NEW |