OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" |
| 10 #include "content/public/common/webplugininfo.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 struct AdobeReaderPluginInfo { |
| 15 bool is_installed; |
| 16 bool is_enabled; // Only valid in the context of a given Profile. |
| 17 bool is_secure; // Whether the plugin is up to date. |
| 18 content::WebPluginInfo plugin_info; |
| 19 }; |
| 20 |
| 21 typedef base::Callback<void(const AdobeReaderPluginInfo&)> |
| 22 GetAdobeReaderPluginInfoCallback; |
| 23 |
| 24 // Fetches information about the Adobe Reader plugin asynchronously. |
| 25 // If |profile| is NULL, then the plugin's enable status cannot be |
| 26 // determined. |
| 27 void GetAdobeReaderPluginInfoAsync( |
| 28 Profile* profile, |
| 29 const GetAdobeReaderPluginInfoCallback& callback); |
| 30 |
| 31 // Fetches information about the Adobe Reader plugin synchronously. |
| 32 // Returns true if the plugin info is not stale. |
| 33 // If |profile| is NULL, then the plugin's enable status cannot be |
| 34 // determined. |
| 35 bool GetAdobeReaderPluginInfo(Profile* profile, |
| 36 AdobeReaderPluginInfo* reader_info); |
| 37 |
| 38 // Returns true if Adobe Reader or Adobe Acrobat is the default viewer for the |
| 39 // .pdf extension. |
| 40 bool IsAdobeReaderDefaultPDFViewer(); |
| 41 |
| 42 // If Adobe Reader or Adobe Acrobat is program associated with the .pdf viewer, |
| 43 // return true if the executable is up to date. |
| 44 // If Reader/Acrobat is not the default .pdf handler, return false. |
| 45 // This function does blocking I/O, since it needs to read from the disk. |
| 46 bool IsAdobeReaderUpToDate(); |
| 47 |
| 48 #endif // CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_ |
OLD | NEW |