Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / android / banners / app_banner_settings_helper.h
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_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace content {
13 class WebContents;
14 }  // namesapce content
15
16 class GURL;
17
18 // Utility class for reading and updating ContentSettings for app banners.
19 class AppBannerSettingsHelper {
20  public:
21   // Checks if a URL is allowed to show a banner for the given package.
22   static bool IsAllowed(content::WebContents* web_contents,
23                         const GURL& origin_url,
24                         const std::string& package_name);
25
26   // Blocks a URL from showing a banner for the given package.
27   static void Block(content::WebContents* web_contents,
28                     const GURL& origin_url,
29                     const std::string& package_name);
30
31  private:
32   DISALLOW_COPY_AND_ASSIGN(AppBannerSettingsHelper);
33 };
34
35 #endif  // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_