Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / extensions / extension_ui_util.h
blob0cfba1a63fcd931b08dab9e7f534e5121f621f8e
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_EXTENSIONS_EXTENSION_UI_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UI_UTIL_H_
8 namespace content {
9 class BrowserContext;
10 class WebContents;
13 namespace extensions {
15 class Extension;
17 namespace ui_util {
19 // Returns true if the extension should be displayed in the app launcher.
20 // Checks whether the extension is an ephemeral app or should be hidden due to
21 // policy.
22 bool ShouldDisplayInAppLauncher(const Extension* extension,
23 content::BrowserContext* context);
25 // Returns true if the extension can be displayed in the app launcher.
26 // Checks whether the extension should be hidden due to policy, but does not
27 // exclude ephemeral apps.
28 bool CanDisplayInAppLauncher(const Extension* extension,
29 content::BrowserContext* context);
31 // Returns true if the extension should be displayed in the browser NTP.
32 // Checks whether the extension is an ephemeral app or should be hidden due to
33 // policy.
34 bool ShouldDisplayInNewTabPage(const Extension* extension,
35 content::BrowserContext* context);
37 // Returns true if the extension should be displayed in the extension
38 // settings page (i.e. chrome://extensions). Checks whether the extension is
39 // an ephemeral app.
40 bool ShouldDisplayInExtensionSettings(const Extension* extension,
41 content::BrowserContext* context);
43 // Returns true if the extension should not be shown anywhere. This is
44 // mostly the same as the extension being a component extension, but also
45 // includes non-component apps that are hidden from the app launcher and NTP,
46 // as well as ephemeral apps.
47 bool ShouldNotBeVisible(const Extension* extension,
48 content::BrowserContext* context);
50 } // namespace ui_util
51 } // namespace extensions
53 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UI_UTIL_H_