OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/utility/shell_handler_win.h" | 5 #include "chrome/utility/shell_handler_win.h" |
6 | 6 |
7 #include <commdlg.h> | 7 #include <commdlg.h> |
8 | 8 |
| 9 #include <memory> |
| 10 |
9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "chrome/common/chrome_utility_messages.h" | 12 #include "chrome/common/chrome_utility_messages.h" |
12 #include "content/public/utility/utility_thread.h" | 13 #include "content/public/utility/utility_thread.h" |
13 #include "ui/base/win/open_file_name_win.h" | 14 #include "ui/base/win/open_file_name_win.h" |
14 #include "ui/base/win/shell.h" | 15 #include "ui/base/win/shell.h" |
15 | 16 |
16 ShellHandler::ShellHandler() {} | 17 ShellHandler::ShellHandler() {} |
17 ShellHandler::~ShellHandler() {} | 18 ShellHandler::~ShellHandler() {} |
18 | 19 |
19 bool ShellHandler::OnMessageReceived(const IPC::Message& message) { | 20 bool ShellHandler::OnMessageReceived(const IPC::Message& message) { |
20 bool handled = true; | 21 bool handled = true; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 88 } |
88 | 89 |
89 // Zero means the dialog was closed, otherwise we had an error. | 90 // Zero means the dialog was closed, otherwise we had an error. |
90 DWORD error_code = ::CommDlgExtendedError(); | 91 DWORD error_code = ::CommDlgExtendedError(); |
91 if (error_code != 0) | 92 if (error_code != 0) |
92 NOTREACHED() << "GetSaveFileName failed with code: " << error_code; | 93 NOTREACHED() << "GetSaveFileName failed with code: " << error_code; |
93 | 94 |
94 content::UtilityThread::Get()->Send( | 95 content::UtilityThread::Get()->Send( |
95 new ChromeUtilityHostMsg_GetSaveFileName_Failed()); | 96 new ChromeUtilityHostMsg_GetSaveFileName_Failed()); |
96 } | 97 } |
OLD | NEW |