summaryrefslogtreecommitdiffstats
path: root/chrome/browser/banners/app_banner_debug_log.h
blob: 0d0790872b6802047bc27aedc606fa1dff434ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_
#define CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_

#include <string>

namespace content {
class WebContents;
}  // namespace content

namespace banners {

// Error message strings used to notify developers via the console.
extern const char kRendererRequestCancel[];
extern const char kManifestEmpty[];
extern const char kNoManifest[];
extern const char kCannotDetermineBestIcon[];
extern const char kNoMatchingServiceWorker[];
extern const char kNoIconAvailable[];
extern const char kBannerAlreadyAdded[];
extern const char kUserNavigatedBeforeBannerShown[];
extern const char kStartURLNotValid[];
extern const char kManifestMissingNameOrShortName[];
extern const char kManifestMissingSuitableIcon[];
extern const char kNotLoadedInMainFrame[];
extern const char kNotServedFromSecureOrigin[];
extern const char kIgnoredNotSupportedOnAndroid[];
extern const char kIgnoredNoId[];
extern const char kIgnoredIdsDoNotMatch[];

// Logs a message to the main console if a banner could not be shown
// and the engagement checks have been bypassed.
void OutputDeveloperNotShownMessage(content::WebContents* web_contents,
                                    const std::string& message,
                                    bool is_debug_mode);

// Logs a debugging message to the main console if the engagement checks have
// been bypassed.
void OutputDeveloperDebugMessage(content::WebContents* web_contents,
                                 const std::string& message,
                                 bool is_debug_mode);

}  // namespace banners

#endif  // CHROME_BROWSER_BANNERS_APP_BANNER_DEBUG_LOG_H_