// 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_web_contents_helper_client.h"
#include "content/public/browser/web_contents.h"
-#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/controls/message_box_view.h"
#include "ui/views/controls/textfield/textfield.h"
public:
PDFPasswordDialogViews(content::WebContents* web_contents,
const base::string16& prompt,
- const PasswordDialogClosedCallback& callback);
+ const pdf::PasswordDialogClosedCallback& callback);
virtual ~PDFPasswordDialogViews();
// 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);
};
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 =
void ShowPDFPasswordDialog(content::WebContents* web_contents,
const base::string16& prompt,
- const PasswordDialogClosedCallback& callback) {
+ const pdf::PasswordDialogClosedCallback& callback) {
new PDFPasswordDialogViews(web_contents, prompt, callback);
}