Fix infinite recursion on hiding panel when created during fullscreen mode.
[chromium-blink-merge.git] / chrome / browser / android / banners / app_banner_settings_helper.h
blobd1173a8866a0ead9da972b497e5645734a17311a
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_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
8 #include <string>
10 #include "base/macros.h"
12 namespace content {
13 class WebContents;
14 } // namesapce content
16 class GURL;
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);
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);
31 private:
32 DISALLOW_COPY_AND_ASSIGN(AppBannerSettingsHelper);
35 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_SETTINGS_HELPER_H_