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

Unified Diff: chrome/browser/ui/views/pdf_password_dialog.cc

Issue 477263003: pdf: Create a separate component for using the pdf pepper plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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/views/pdf_password_dialog.cc
diff --git a/chrome/browser/ui/views/pdf_password_dialog.cc b/chrome/browser/ui/views/pdf_password_dialog.cc
index cb5b28782e7d7965271ebcf4d29ca65dfb451ef0..959bdfcff86e34fa8ae60a9ac83737d28b1c78e0 100644
--- a/chrome/browser/ui/views/pdf_password_dialog.cc
+++ b/chrome/browser/ui/views/pdf_password_dialog.cc
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/pdf/pdf_tab_helper.h"
-
#include "chrome/browser/ui/views/constrained_window_views.h"
#include "chrome/grit/generated_resources.h"
+#include "components/pdf/browser/pdf_tab_helper_delegate.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/message_box_view.h"
@@ -21,7 +20,7 @@ class PDFPasswordDialogViews : public views::DialogDelegate {
public:
PDFPasswordDialogViews(content::WebContents* web_contents,
const base::string16& prompt,
- const PasswordDialogClosedCallback& callback);
+ const pdf::PasswordDialogClosedCallback& callback);
virtual ~PDFPasswordDialogViews();
// views::DialogDelegate:
@@ -43,7 +42,7 @@ class PDFPasswordDialogViews : public views::DialogDelegate {
// The message box view whose commands we handle.
views::MessageBoxView* message_box_view_;
- PasswordDialogClosedCallback callback_;
+ pdf::PasswordDialogClosedCallback callback_;
DISALLOW_COPY_AND_ASSIGN(PDFPasswordDialogViews);
};
@@ -51,9 +50,8 @@ class PDFPasswordDialogViews : public views::DialogDelegate {
PDFPasswordDialogViews::PDFPasswordDialogViews(
content::WebContents* web_contents,
const base::string16& prompt,
- const PasswordDialogClosedCallback& callback)
- : message_box_view_(NULL),
- callback_(callback) {
+ const pdf::PasswordDialogClosedCallback& callback)
+ : message_box_view_(NULL), callback_(callback) {
views::MessageBoxView::InitParams init_params(prompt);
init_params.options = views::MessageBoxView::HAS_PROMPT_FIELD;
init_params.inter_row_vertical_spacing =
@@ -130,6 +128,6 @@ ui::ModalType PDFPasswordDialogViews::GetModalType() const {
void ShowPDFPasswordDialog(content::WebContents* web_contents,
const base::string16& prompt,
- const PasswordDialogClosedCallback& callback) {
+ const pdf::PasswordDialogClosedCallback& callback) {
new PDFPasswordDialogViews(web_contents, prompt, callback);
}

Powered by Google App Engine
This is Rietveld 408576698