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/gtk/download_in_progress_dialog_gtk.h" | 5 #include "chrome/browser/gtk/download_in_progress_dialog_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/download/download_manager.h" | 12 #include "chrome/browser/download/download_manager.h" |
13 #include "chrome/browser/gtk/gtk_util.h" | 13 #include "chrome/browser/gtk/gtk_util.h" |
14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
17 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 | 19 |
20 DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser) | 20 DownloadInProgressDialogGtk::DownloadInProgressDialogGtk(Browser* browser) |
21 : browser_(browser) { | 21 : browser_(browser) { |
22 int download_count = browser->profile()->GetDownloadManager()-> | 22 int download_count = browser->profile()->GetDownloadManager()-> |
23 in_progress_count(); | 23 in_progress_count(); |
24 | 24 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 gtk_widget_show_all(dialog); | 76 gtk_widget_show_all(dialog); |
77 } | 77 } |
78 | 78 |
79 void DownloadInProgressDialogGtk::OnResponse(GtkWidget* widget, | 79 void DownloadInProgressDialogGtk::OnResponse(GtkWidget* widget, |
80 int response) { | 80 int response) { |
81 gtk_widget_destroy(widget); | 81 gtk_widget_destroy(widget); |
82 browser_->InProgressDownloadResponse(response == GTK_RESPONSE_ACCEPT); | 82 browser_->InProgressDownloadResponse(response == GTK_RESPONSE_ACCEPT); |
83 delete this; | 83 delete this; |
84 } | 84 } |
OLD | NEW |