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.
5 #ifndef CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_
6 #define CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "content/public/common/webplugininfo.h"
14 struct AdobeReaderPluginInfo
{
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
;
21 typedef base::Callback
<void(const AdobeReaderPluginInfo
&)>
22 GetAdobeReaderPluginInfoCallback
;
24 // Fetches information about the Adobe Reader plugin asynchronously.
25 // If |profile| is NULL, then the plugin's enable status cannot be
27 void GetAdobeReaderPluginInfoAsync(
29 const GetAdobeReaderPluginInfoCallback
& callback
);
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
35 bool GetAdobeReaderPluginInfo(Profile
* profile
,
36 AdobeReaderPluginInfo
* reader_info
);
38 // Returns true if Adobe Reader or Adobe Acrobat is the default viewer for the
40 bool IsAdobeReaderDefaultPDFViewer();
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();
48 #endif // CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_