Chromium Code Reviews| 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_contents/tab_contents.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 } | 87 } |
| 88 | 88 |
| 89 void TabModalConfirmDialogGtk::DeleteDelegate() { | 89 void TabModalConfirmDialogGtk::DeleteDelegate() { |
| 90 delete this; | 90 delete this; |
| 91 } | 91 } |
| 92 | 92 |
| 93 TabModalConfirmDialogGtk::~TabModalConfirmDialogGtk() { | 93 TabModalConfirmDialogGtk::~TabModalConfirmDialogGtk() { |
| 94 gtk_widget_destroy(dialog_); | 94 gtk_widget_destroy(dialog_); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void TabModalConfirmDialogGtk::AcceptTabModalDialog() { | |
| 98 OnAccept(NULL); | |
| 99 } | |
| 100 | |
| 101 void TabModalConfirmDialogGtk::CancelTabModalDialog() { | |
| 102 OnCancel(NULL); | |
| 103 } | |
| 104 | |
| 97 void TabModalConfirmDialogGtk::OnAccept(GtkWidget* widget) { | 105 void TabModalConfirmDialogGtk::OnAccept(GtkWidget* widget) { |
| 98 delegate_->Accept(); | 106 delegate_->Accept(); |
| 99 } | 107 } |
| 100 | 108 |
| 101 void TabModalConfirmDialogGtk::OnCancel(GtkWidget* widget) { | 109 void TabModalConfirmDialogGtk::OnCancel(GtkWidget* widget) { |
| 102 delegate_->Cancel(); | 110 delegate_->Cancel(); |
| 103 } | 111 } |
| 112 | |
| 113 TabModalConfirmDialog* TabModalConfirmDialog::Create( | |
|
Peter Kasting
2012/09/25 00:39:20
Nit: Place atop .cc file
tfarina
2012/09/25 02:03:38
Done.
| |
| 114 TabModalConfirmDialogDelegate* delegate, | |
| 115 TabContents* tab_contents) { | |
| 116 return new TabModalConfirmDialogGtk(delegate, tab_contents); | |
| 117 } | |
| OLD | NEW |