Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/ui/views/download/download_in_progress_dialog_view.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/download/download_in_progress_dialog_view.h" 5 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/grit/chromium_strings.h" 10 #include "chrome/grit/chromium_strings.h"
11 #include "chrome/grit/generated_resources.h" 11 #include "chrome/grit/generated_resources.h"
12 #include "components/constrained_window/constrained_window_views.h" 12 #include "components/constrained_window/constrained_window_views.h"
13 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/gfx/size.h" 14 #include "ui/gfx/size.h"
15 #include "ui/views/border.h" 15 #include "ui/views/border.h"
16 #include "ui/views/controls/message_box_view.h" 16 #include "ui/views/controls/message_box_view.h"
17 #include "ui/views/layout/grid_layout.h" 17 #include "ui/views/layout/grid_layout.h"
18 #include "ui/views/widget/widget.h" 18 #include "ui/views/widget/widget.h"
19 19
20 // static 20 // static
21 void DownloadInProgressDialogView::Show( 21 void DownloadInProgressDialogView::Show(
22 gfx::NativeWindow parent, 22 gfx::NativeWindow parent,
23 int download_count, 23 int download_count,
24 Browser::DownloadClosePreventionType dialog_type, 24 Browser::DownloadClosePreventionType dialog_type,
25 bool app_modal, 25 bool app_modal,
26 const base::Callback<void(bool)>& callback) { 26 const base::Callback<void(bool)>& callback) {
27 DownloadInProgressDialogView* window = new DownloadInProgressDialogView( 27 DownloadInProgressDialogView* window = new DownloadInProgressDialogView(
28 download_count, dialog_type, app_modal, callback); 28 download_count, dialog_type, app_modal, callback);
29 CreateBrowserModalDialogViews(window, parent)->Show(); 29 CreateAppModalDialogViews(window, parent)->Show();
30 } 30 }
31 31
32 DownloadInProgressDialogView::DownloadInProgressDialogView( 32 DownloadInProgressDialogView::DownloadInProgressDialogView(
33 int download_count, 33 int download_count,
34 Browser::DownloadClosePreventionType dialog_type, 34 Browser::DownloadClosePreventionType dialog_type,
35 bool app_modal, 35 bool app_modal,
36 const base::Callback<void(bool)>& callback) 36 const base::Callback<void(bool)>& callback)
37 : app_modal_(app_modal), 37 : app_modal_(app_modal),
38 callback_(callback), 38 callback_(callback),
39 message_box_view_(NULL) { 39 message_box_view_(NULL) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return message_box_view_->GetWidget(); 120 return message_box_view_->GetWidget();
121 } 121 }
122 122
123 const views::Widget* DownloadInProgressDialogView::GetWidget() const { 123 const views::Widget* DownloadInProgressDialogView::GetWidget() const {
124 return message_box_view_->GetWidget(); 124 return message_box_view_->GetWidget();
125 } 125 }
126 126
127 views::View* DownloadInProgressDialogView::GetContentsView() { 127 views::View* DownloadInProgressDialogView::GetContentsView() {
128 return message_box_view_; 128 return message_box_view_;
129 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698