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

Side by Side Diff: chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc

Issue 18786005: Cleanup: remove redundant tab close observation from TabModalConfirmDialogDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 months 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 | Annotate | Revision Log
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/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/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 window_ = CreateWebContentsModalDialogGtk(dialog_, cancel_); 103 window_ = CreateWebContentsModalDialogGtk(dialog_, cancel_);
104 delegate_->set_operations_delegate(this); 104 delegate_->set_operations_delegate(this);
105 105
106 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 106 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
107 WebContentsModalDialogManager::FromWebContents(web_contents); 107 WebContentsModalDialogManager::FromWebContents(web_contents);
108 web_contents_modal_dialog_manager->ShowDialog(window_); 108 web_contents_modal_dialog_manager->ShowDialog(window_);
109 } 109 }
110 110
111 TabModalConfirmDialogGtk::~TabModalConfirmDialogGtk() { 111 TabModalConfirmDialogGtk::~TabModalConfirmDialogGtk() {
112 // Provide a disposition in case the dialog was closed without accepting or
113 // cancelling.
114 delegate_->Cancel();
115
112 gtk_widget_destroy(dialog_); 116 gtk_widget_destroy(dialog_);
113 } 117 }
114 118
115 void TabModalConfirmDialogGtk::AcceptTabModalDialog() { 119 void TabModalConfirmDialogGtk::AcceptTabModalDialog() {
116 OnAccept(NULL); 120 OnAccept(NULL);
117 } 121 }
118 122
119 void TabModalConfirmDialogGtk::CancelTabModalDialog() { 123 void TabModalConfirmDialogGtk::CancelTabModalDialog() {
120 OnCancel(NULL); 124 OnCancel(NULL);
121 } 125 }
(...skipping 17 matching lines...) Expand all
139 delegate_->Cancel(); 143 delegate_->Cancel();
140 } 144 }
141 145
142 void TabModalConfirmDialogGtk::OnLinkClicked(GtkWidget* widget) { 146 void TabModalConfirmDialogGtk::OnLinkClicked(GtkWidget* widget) {
143 delegate_->LinkClicked(event_utils::DispositionForCurrentButtonPressEvent()); 147 delegate_->LinkClicked(event_utils::DispositionForCurrentButtonPressEvent());
144 } 148 }
145 149
146 void TabModalConfirmDialogGtk::OnDestroy(GtkWidget* widget) { 150 void TabModalConfirmDialogGtk::OnDestroy(GtkWidget* widget) {
147 delete this; 151 delete this;
148 } 152 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698