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_
13 namespace extensions
{
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
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
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
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_