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

Unified Diff: chrome/browser/printing/print_dialog_gtk.cc

Issue 10436002: Remove use of BrowserList::GetLastActive from PrintDialogGtk. Pass through the parent GtkWidget ins… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_dialog_gtk.h ('k') | printing/print_dialog_gtk_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_gtk.cc
===================================================================
--- chrome/browser/printing/print_dialog_gtk.cc (revision 138673)
+++ chrome/browser/printing/print_dialog_gtk.cc (working copy)
@@ -19,9 +19,6 @@
#include "base/message_loop_proxy.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_window.h"
#include "printing/metafile.h"
#include "printing/print_job_constants.h"
#include "printing/print_settings.h"
@@ -233,11 +230,12 @@
}
void PrintDialogGtk::ShowDialog(
+ gfx::NativeView parent_view,
bool has_selection,
const PrintingContextGtk::PrintSettingsCallback& callback) {
callback_ = callback;
- GtkWindow* parent = BrowserList::GetLastActive()->window()->GetNativeHandle();
+ GtkWindow* parent = GTK_WINDOW(gtk_widget_get_toplevel(parent_view));
// TODO(estade): We need a window title here.
dialog_ = gtk_print_unix_dialog_new(NULL, parent);
g_signal_connect(dialog_, "delete-event",
« no previous file with comments | « chrome/browser/printing/print_dialog_gtk.h ('k') | printing/print_dialog_gtk_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698