android-components / mozilla.components.browser.menu / WebExtensionBrowserMenuBuilder

WebExtensionBrowserMenuBuilder

class WebExtensionBrowserMenuBuilder : BrowserMenuBuilder (source)

Browser menu builder with web extension support. It allows WebExtensionBrowserMenu to add web extension browser actions.

Parameters

store - BrowserStore required to render web extension browser actions

appendExtensionActionAtStart - true if web extensions appear at the top (start) of the menu, false if web extensions appear at the bottom of the menu. Default to false (bottom).

Constructors

Name Summary
<init> WebExtensionBrowserMenuBuilder(items: List<BrowserMenuItem>, extras: Map<String, Any> = emptyMap(), endOfMenuAlwaysVisible: Boolean = false, store: BrowserStore, appendExtensionActionAtStart: Boolean = false)
Browser menu builder with web extension support. It allows WebExtensionBrowserMenu to add web extension browser actions.

Inherited Properties

Name Summary
endOfMenuAlwaysVisible val endOfMenuAlwaysVisible: Boolean
when is set to true makes sure the bottom of the menu is always visible otherwise, the top of the menu is always visible.
extras val extras: Map<String, Any>
Map of extra values that are added to emitted facts
items val items: List<BrowserMenuItem>
List of BrowserMenuItem objects to compose the menu from.

Functions

Name Summary
build fun build(context: <ERROR CLASS>): BrowserMenu
Builds and returns a browser menu with combination of items and web extension browser actions.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.