| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/libgtk2ui/print_dialog_gtk2.h" | 5 #include "chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h" |
| 6 | 6 |
| 7 #include <gtk/gtkunixprint.h> | 7 #include <gtk/gtkunixprint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
| 16 #include "base/files/file_util_proxy.h" | 16 #include "base/files/file_util_proxy.h" |
| 17 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
| 18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/message_loop/message_loop_proxy.h" | |
| 20 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/values.h" | 20 #include "base/values.h" |
| 22 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" | 21 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" |
| 23 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" | 22 #include "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" |
| 24 #include "printing/metafile.h" | 23 #include "printing/metafile.h" |
| 25 #include "printing/print_job_constants.h" | 24 #include "printing/print_job_constants.h" |
| 26 #include "printing/print_settings.h" | 25 #include "printing/print_settings.h" |
| 27 #include "ui/aura/window.h" | 26 #include "ui/aura/window.h" |
| 28 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" | 27 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" |
| 29 | 28 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 context_->InitWithSettings(*settings); | 538 context_->InitWithSettings(*settings); |
| 540 } | 539 } |
| 541 | 540 |
| 542 void PrintDialogGtk2::OnWindowDestroying(aura::Window* window) { | 541 void PrintDialogGtk2::OnWindowDestroying(aura::Window* window) { |
| 543 DCHECK_EQ(libgtk2ui::GetAuraTransientParent(dialog_), window); | 542 DCHECK_EQ(libgtk2ui::GetAuraTransientParent(dialog_), window); |
| 544 | 543 |
| 545 libgtk2ui::ClearAuraTransientParent(dialog_); | 544 libgtk2ui::ClearAuraTransientParent(dialog_); |
| 546 window->RemoveObserver(this); | 545 window->RemoveObserver(this); |
| 547 Release(); | 546 Release(); |
| 548 } | 547 } |
| OLD | NEW |