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

Side by Side Diff: chrome/browser/chromeos/native_dialog_window.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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) 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/chromeos/native_dialog_window.h" 5 #include "chrome/browser/chromeos/native_dialog_window.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 window_bounds.set_width(window_size.width()); 148 window_bounds.set_width(window_size.width());
149 window_bounds.set_height(window_size.height()); 149 window_bounds.set_height(window_size.height());
150 window()->SetWindowBounds(window_bounds, NULL); 150 window()->SetWindowBounds(window_bounds, NULL);
151 } 151 }
152 } 152 }
153 } 153 }
154 154
155 void NativeDialogHost::OnDialogDestroy(GtkWidget* widget) { 155 void NativeDialogHost::OnDialogDestroy(GtkWidget* widget) {
156 dialog_ = NULL; 156 dialog_ = NULL;
157 destroy_signal_id_ = 0; 157 destroy_signal_id_ = 0;
158 window()->CloseWindow(); 158 window()->Close();
159 } 159 }
160 160
161 /////////////////////////////////////////////////////////////////////////////// 161 ///////////////////////////////////////////////////////////////////////////////
162 // NativeDialogHost, views::DialogDelegate implementation: 162 // NativeDialogHost, views::DialogDelegate implementation:
163 void NativeDialogHost::WindowClosing() { 163 void NativeDialogHost::WindowClosing() {
164 if (dialog_) { 164 if (dialog_) {
165 // Disconnect the "destroy" signal because we are about to destroy 165 // Disconnect the "destroy" signal because we are about to destroy
166 // the dialog ourselves and no longer interested in it. 166 // the dialog ourselves and no longer interested in it.
167 g_signal_handler_disconnect(G_OBJECT(dialog_), destroy_signal_id_); 167 g_signal_handler_disconnect(G_OBJECT(dialog_), destroy_signal_id_);
168 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); 168 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return host ? host->window()->GetNativeWindow() : NULL; 281 return host ? host->window()->GetNativeWindow() : NULL;
282 } 282 }
283 283
284 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) { 284 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) {
285 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>( 285 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>(
286 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost)); 286 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost));
287 return host ? host->bounds() : gfx::Rect(); 287 return host ? host->bounds() : gfx::Rect();
288 } 288 }
289 289
290 } // namespace chromeos 290 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/notifications/balloon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698