OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BANNERS_APP_BANNER_DEBUG_LOG_H_ | 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_ |
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_ | 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class WebContents; | 11 class WebContents; |
12 } // namespace content | 12 } // namespace content |
13 | 13 |
14 namespace banners { | 14 namespace banners { |
15 | 15 |
16 // Error message strings used to notify developers via the console. | 16 // Error message strings used to notify developers via the console. |
17 | 17 |
18 enum OutputDeveloperMessageCode { | 18 enum OutputDeveloperMessageCode { |
19 kRendererRequestCancel, | 19 kRendererRequestCancel, |
20 kManifestEmpty, | 20 kManifestEmpty, |
21 kNoManifest, | 21 kNoManifest, |
22 kNoIconMatchingRequirements, | 22 kNoIconMatchingRequirements, |
23 kCannotDownloadIcon, | 23 kCannotDownloadIcon, |
24 kNoMatchingServiceWorker, | 24 kNoMatchingServiceWorker, |
25 kNoIconAvailable, | 25 kNoIconAvailable, |
26 kUserNavigatedBeforeBannerShown, | 26 kUserNavigatedBeforeBannerShown, |
27 kStartURLNotValid, | 27 kStartURLNotValid, |
| 28 kManifestDisplayStandaloneFullscreen, |
28 kManifestMissingNameOrShortName, | 29 kManifestMissingNameOrShortName, |
29 kManifestMissingSuitableIcon, | 30 kManifestMissingSuitableIcon, |
30 kNotLoadedInMainFrame, | 31 kNotLoadedInMainFrame, |
31 kNotServedFromSecureOrigin, | 32 kNotServedFromSecureOrigin, |
32 kIgnoredNotSupportedOnAndroid, | 33 kIgnoredNotSupportedOnAndroid, |
33 kIgnoredNoId, | 34 kIgnoredNoId, |
34 kIgnoredIdsDoNotMatch, | 35 kIgnoredIdsDoNotMatch, |
35 }; | 36 }; |
36 | 37 |
37 // Logs a message to the main console if a banner could not be shown | 38 // Logs a message to the main console if a banner could not be shown |
38 // and the engagement checks have been bypassed. | 39 // and the engagement checks have been bypassed. |
39 void OutputDeveloperNotShownMessage(content::WebContents* web_contents, | 40 void OutputDeveloperNotShownMessage(content::WebContents* web_contents, |
40 OutputDeveloperMessageCode code, | 41 OutputDeveloperMessageCode code, |
41 bool is_debug_mode); | 42 bool is_debug_mode); |
42 | 43 |
43 // Logs a message to the main console if a banner could not be shown | 44 // Logs a message to the main console if a banner could not be shown |
44 // and the engagement checks have been bypassed. | 45 // and the engagement checks have been bypassed. |
45 void OutputDeveloperNotShownMessage(content::WebContents* web_contents, | 46 void OutputDeveloperNotShownMessage(content::WebContents* web_contents, |
46 OutputDeveloperMessageCode code, | 47 OutputDeveloperMessageCode code, |
47 const std::string& param, | 48 const std::string& param, |
48 bool is_debug_mode); | 49 bool is_debug_mode); |
49 | 50 |
50 } // namespace banners | 51 } // namespace banners |
51 | 52 |
52 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_ | 53 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_ |
OLD | NEW |