OLD | NEW |
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/gtk/tab_modal_confirm_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 10 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
11 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 11 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
12 #include "content/public/browser/notification_types.h" | 12 #include "content/public/browser/notification_types.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 #include "ui/base/gtk/gtk_hig_constants.h" | 14 #include "ui/base/gtk/gtk_hig_constants.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
17 | 17 |
| 18 using web_modal::WebContentsModalDialogManager; |
| 19 |
18 TabModalConfirmDialog* TabModalConfirmDialog::Create( | 20 TabModalConfirmDialog* TabModalConfirmDialog::Create( |
19 TabModalConfirmDialogDelegate* delegate, | 21 TabModalConfirmDialogDelegate* delegate, |
20 content::WebContents* web_contents) { | 22 content::WebContents* web_contents) { |
21 return new TabModalConfirmDialogGtk(delegate, web_contents); | 23 return new TabModalConfirmDialogGtk(delegate, web_contents); |
22 } | 24 } |
23 | 25 |
24 TabModalConfirmDialogGtk::TabModalConfirmDialogGtk( | 26 TabModalConfirmDialogGtk::TabModalConfirmDialogGtk( |
25 TabModalConfirmDialogDelegate* delegate, | 27 TabModalConfirmDialogDelegate* delegate, |
26 content::WebContents* web_contents) | 28 content::WebContents* web_contents) |
27 : delegate_(delegate), | 29 : delegate_(delegate), |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 delegate_->Accept(); | 103 delegate_->Accept(); |
102 } | 104 } |
103 | 105 |
104 void TabModalConfirmDialogGtk::OnCancel(GtkWidget* widget) { | 106 void TabModalConfirmDialogGtk::OnCancel(GtkWidget* widget) { |
105 delegate_->Cancel(); | 107 delegate_->Cancel(); |
106 } | 108 } |
107 | 109 |
108 void TabModalConfirmDialogGtk::OnDestroy(GtkWidget* widget) { | 110 void TabModalConfirmDialogGtk::OnDestroy(GtkWidget* widget) { |
109 delete this; | 111 delete this; |
110 } | 112 } |
OLD | NEW |