OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void OnUpdateContentRestrictions(int content_restrictions); | 54 void OnUpdateContentRestrictions(int content_restrictions); |
55 void OnModalPromptForPassword(const std::string& prompt, | 55 void OnModalPromptForPassword(const std::string& prompt, |
56 IPC::Message* reply_message); | 56 IPC::Message* reply_message); |
57 | 57 |
58 // The model for the confirmation prompt to open a PDF in Adobe Reader. | 58 // The model for the confirmation prompt to open a PDF in Adobe Reader. |
59 scoped_ptr<OpenPDFInReaderPromptDelegate> open_in_reader_prompt_; | 59 scoped_ptr<OpenPDFInReaderPromptDelegate> open_in_reader_prompt_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(PDFTabHelper); | 61 DISALLOW_COPY_AND_ASSIGN(PDFTabHelper); |
62 }; | 62 }; |
63 | 63 |
64 // TODO(avi): write for other platforms | 64 #if !defined(TOOLKIT_GTK) |
65 #if defined(OS_MACOSX) | |
66 typedef base::Callback<void(bool /* success */, | 65 typedef base::Callback<void(bool /* success */, |
67 const base::string16& /* password */)> | 66 const base::string16& /* password */)> |
68 PasswordDialogClosedCallback; | 67 PasswordDialogClosedCallback; |
69 | 68 |
70 // Shows a tab-modal dialog to get a password for a PDF document. | 69 // Shows a tab-modal dialog to get a password for a PDF document. |
71 void ShowPDFPasswordDialog(content::WebContents* web_contents, | 70 void ShowPDFPasswordDialog(content::WebContents* web_contents, |
72 const base::string16& prompt, | 71 const base::string16& prompt, |
73 const PasswordDialogClosedCallback& callback); | 72 const PasswordDialogClosedCallback& callback); |
74 #endif // OS_* | 73 #endif // !TOOLKIT_GTK |
75 | 74 |
76 #endif // CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ | 75 #endif // CHROME_BROWSER_UI_PDF_PDF_TAB_HELPER_H_ |
OLD | NEW |