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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: add missing files Created 3 years, 10 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
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 9257c9bdd1f940ebd34427627608ccf8ed166b1b..0ee4049932557e9b52a7f011ad6b29c12e4954a7 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -34,7 +34,6 @@
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_prefs.h"
-#include "chrome/browser/platform_util.h"
#include "chrome/browser/printing/print_dialog_cloud.h"
#include "chrome/browser/printing/print_error_dialog.h"
#include "chrome/browser/printing/print_job_manager.h"
@@ -86,6 +85,7 @@
#include "printing/printing_context.h"
#include "printing/units.h"
#include "third_party/icu/source/i18n/unicode/ulocdata.h"
+#include "ui/gfx/view_util.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/printing/printers_manager.h"
@@ -1016,8 +1016,8 @@ void PrintPreviewHandler::PrintToPdf() {
// User has already selected a path, no need to show the dialog again.
PostPrintToPdfTask();
} else if (!select_file_dialog_.get() ||
- !select_file_dialog_->IsRunning(platform_util::GetTopLevel(
- preview_web_contents()->GetNativeView()))) {
+ !select_file_dialog_->IsRunning(
+ gfx::GetTopLevel(preview_web_contents()->GetNativeView()))) {
// Pre-populating select file dialog with print job title.
base::string16 print_job_title_utf16 =
print_preview_ui()->initiator_title();
@@ -1422,14 +1422,10 @@ void PrintPreviewHandler::SelectFile(const base::FilePath& default_filename,
select_file_dialog_ =
ui::SelectFileDialog::Create(this, nullptr /*policy already checked*/);
select_file_dialog_->SelectFile(
- ui::SelectFileDialog::SELECT_SAVEAS_FILE,
- base::string16(),
- download_prefs->SaveFilePath().Append(default_filename),
- &file_type_info,
- 0,
- base::FilePath::StringType(),
- platform_util::GetTopLevel(preview_web_contents()->GetNativeView()),
- NULL);
+ ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(),
+ download_prefs->SaveFilePath().Append(default_filename), &file_type_info,
+ 0, base::FilePath::StringType(),
+ gfx::GetTopLevel(preview_web_contents()->GetNativeView()), NULL);
}
void PrintPreviewHandler::OnGotUniqueFileName(const base::FilePath& path) {

Powered by Google App Engine
This is Rietveld 408576698