OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <commdlg.h> | 8 #include <commdlg.h> |
9 #include <objbase.h> | 9 #include <objbase.h> |
10 #include <process.h> | 10 #include <process.h> |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { | 693 if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { |
694 EndDialog(hDlg, LOWORD(wParam)); | 694 EndDialog(hDlg, LOWORD(wParam)); |
695 return (INT_PTR)TRUE; | 695 return (INT_PTR)TRUE; |
696 } | 696 } |
697 break; | 697 break; |
698 } | 698 } |
699 return (INT_PTR)FALSE; | 699 return (INT_PTR)FALSE; |
700 } | 700 } |
701 | 701 |
702 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, | 702 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, |
703 std::wstring* result) { | 703 FilePath* result) { |
704 wchar_t path_buf[MAX_PATH] = L"data.txt"; | 704 wchar_t path_buf[MAX_PATH] = L"data.txt"; |
705 | 705 |
706 OPENFILENAME info = {0}; | 706 OPENFILENAME info = {0}; |
707 info.lStructSize = sizeof(info); | 707 info.lStructSize = sizeof(info); |
708 info.hwndOwner = m_mainWnd; | 708 info.hwndOwner = m_mainWnd; |
709 info.hInstance = instance_handle_; | 709 info.hInstance = instance_handle_; |
710 info.lpstrFilter = L"*.txt"; | 710 info.lpstrFilter = L"*.txt"; |
711 info.lpstrFile = path_buf; | 711 info.lpstrFile = path_buf; |
712 info.nMaxFile = arraysize(path_buf); | 712 info.nMaxFile = arraysize(path_buf); |
713 info.lpstrTitle = prompt_title; | 713 info.lpstrTitle = prompt_title; |
714 if (!GetSaveFileName(&info)) | 714 if (!GetSaveFileName(&info)) |
715 return false; | 715 return false; |
716 | 716 |
717 result->assign(info.lpstrFile); | 717 *result = FilePath(info.lpstrFile); |
718 return true; | 718 return true; |
719 } | 719 } |
720 | 720 |
721 // static | 721 // static |
722 void TestShell::ShowStartupDebuggingDialog() { | 722 void TestShell::ShowStartupDebuggingDialog() { |
723 MessageBox(NULL, L"attach to me?", L"test_shell", MB_OK); | 723 MessageBox(NULL, L"attach to me?", L"test_shell", MB_OK); |
724 } | 724 } |
725 | 725 |
726 // static | 726 // static |
727 base::StringPiece TestShell::NetResourceProvider(int key) { | 727 base::StringPiece TestShell::NetResourceProvider(int key) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 | 809 |
810 bool EnsureFontLoaded(HFONT font) { | 810 bool EnsureFontLoaded(HFONT font) { |
811 return true; | 811 return true; |
812 } | 812 } |
813 | 813 |
814 bool DownloadUrl(const std::string& url, HWND caller_window) { | 814 bool DownloadUrl(const std::string& url, HWND caller_window) { |
815 return false; | 815 return false; |
816 } | 816 } |
817 | 817 |
818 } // namespace webkit_glue | 818 } // namespace webkit_glue |
OLD | NEW |