| 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/browser/file_select_helper.h" | 5 #include "chrome/browser/file_select_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "net/base/mime_util.h" | 13 #include "net/base/mime_util.h" |
| 14 #include "chrome/browser/platform_util.h" | 14 #include "chrome/browser/platform_util.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/renderer_host/render_view_host.h" | 16 #include "chrome/browser/renderer_host/render_view_host.h" |
| 17 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 17 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 18 #include "chrome/browser/shell_dialogs.h" | |
| 19 #include "chrome/common/notification_details.h" | 18 #include "chrome/common/notification_details.h" |
| 20 #include "chrome/common/notification_source.h" | 19 #include "chrome/common/notification_source.h" |
| 21 #include "chrome/common/render_messages_params.h" | 20 #include "chrome/common/render_messages_params.h" |
| 22 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 24 | 23 |
| 25 FileSelectHelper::FileSelectHelper(Profile* profile) | 24 FileSelectHelper::FileSelectHelper(Profile* profile) |
| 26 : profile_(profile), | 25 : profile_(profile), |
| 27 render_view_host_(NULL), | 26 render_view_host_(NULL), |
| 28 select_file_dialog_(), | 27 select_file_dialog_(), |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 NULL); | 238 NULL); |
| 240 } | 239 } |
| 241 | 240 |
| 242 void FileSelectHelper::Observe(NotificationType type, | 241 void FileSelectHelper::Observe(NotificationType type, |
| 243 const NotificationSource& source, | 242 const NotificationSource& source, |
| 244 const NotificationDetails& details) { | 243 const NotificationDetails& details) { |
| 245 DCHECK(type == NotificationType::RENDER_WIDGET_HOST_DESTROYED); | 244 DCHECK(type == NotificationType::RENDER_WIDGET_HOST_DESTROYED); |
| 246 DCHECK(Details<RenderViewHost>(details).ptr() == render_view_host_); | 245 DCHECK(Details<RenderViewHost>(details).ptr() == render_view_host_); |
| 247 render_view_host_ = NULL; | 246 render_view_host_ = NULL; |
| 248 } | 247 } |
| OLD | NEW |