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

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

Issue 8741010: TaskManager: Added functionality to remember the size of the task manager dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed merge conflicts. Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/html_dialog_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/html_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/html_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return std::string(); 112 return std::string();
113 } 113 }
114 114
115 void HtmlDialogGtk::OnDialogClosed(const std::string& json_retval) { 115 void HtmlDialogGtk::OnDialogClosed(const std::string& json_retval) {
116 DCHECK(dialog_); 116 DCHECK(dialog_);
117 117
118 Detach(); 118 Detach();
119 if (delegate_) { 119 if (delegate_) {
120 HtmlDialogUIDelegate* dialog_delegate = delegate_; 120 HtmlDialogUIDelegate* dialog_delegate = delegate_;
121 delegate_ = NULL; // We will not communicate further with the delegate. 121 delegate_ = NULL; // We will not communicate further with the delegate.
122
123 // Store the dialog bounds.
124 gfx::Rect dialog_bounds = gtk_util::GetDialogBounds(GTK_WIDGET(dialog_));
125 dialog_delegate->StoreDialogSize(dialog_bounds);
126
122 dialog_delegate->OnDialogClosed(json_retval); 127 dialog_delegate->OnDialogClosed(json_retval);
123 } 128 }
129
124 gtk_widget_destroy(dialog_); 130 gtk_widget_destroy(dialog_);
125 delete this; 131 delete this;
126 } 132 }
127 133
128 void HtmlDialogGtk::OnCloseContents(TabContents* source, 134 void HtmlDialogGtk::OnCloseContents(TabContents* source,
129 bool* out_close_dialog) { 135 bool* out_close_dialog) {
130 if (delegate_) 136 if (delegate_)
131 delegate_->OnCloseContents(source, out_close_dialog); 137 delegate_->OnCloseContents(source, out_close_dialog);
132 } 138 }
133 139
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 dialog_size.height()); 211 dialog_size.height());
206 212
207 gtk_widget_show_all(dialog_); 213 gtk_widget_show_all(dialog_);
208 214
209 return GTK_WINDOW(dialog_); 215 return GTK_WINDOW(dialog_);
210 } 216 }
211 217
212 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 218 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
213 OnDialogClosed(std::string()); 219 OnDialogClosed(std::string());
214 } 220 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/html_dialog_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698