Class Index | File Index

Classes


Class WindowWrapper


Defined in: AppIntegration.jsm.

Class Summary
Constructor Attributes Constructor Name and Description
 
WindowWrapper(window, hooks)
Class providing various functions related to application windows.
Field Summary
Field Attributes Field Name and Description
 
Data associated with the background image currently under mouse pointer (set in updateContextMenu()).
 
The frame that frameData belongs to.
 
The document node that nodeData belongs to.
 
Methods that can be defined at attributes of the hooks element.
 
Window of the detached list of blockable items (might be null or closed).
 
List of event handers to be registered.
 
Data associated with the frame currently under mouse pointer (set in updateContextMenu()).
 
Data associated with the node currently under mouse pointer (set in updateContextMenu()).
 
Filter corresponding with "disable on site" menu item (set in fillPopup()).
 
Progress listener used to watch for location changes, if any.
 
Filter corresponding with "disable on site" menu item (set in fillPopup()).
 
Current state as displayed for this window.
 
Application window this object belongs to.
Method Summary
Method Attributes Method Name and Description
<private>  
_bindMethod(method)
Binds a function to the object, ensuring that "this" pointer is always set correctly.
 
blockItem(node, item)
Brings up the filter composer dialog to block an item.
 
Clears context menu data once the menu is closed.
 
Sets up hotkeys for the window.
 
E(id)
Retrieves an element by its ID.
 
executeAction(action)
 
Executes window-specific first-run actions if necessary.
 
fillPopup(event)
Updates state of the icon context menu.
 
fillTooltip(event)
Updates state of the icon tooltip.
 
findAvailableKey(id, value, validModifiers, existing)
Finds an available hotkey for a value defined in preferences.
 
Makes a copy of the ABP icon's context menu for the toolbar button.
 
Retrieves the current location of the browser (might return null on failure).
 
Finds the toolbar button in the toolbar palette.
 
handleLinkClick(event, linkTarget)
Handles browser clicks to intercept clicks on abp: links.
 
Handles click events on status bar icon.
 
Handles click events on toolbar icon.
 
Handles command events on toolbar icon.
 
Hide contribute button and persist this choice.
 
Removes toolbar button from the toolbar.
 
Initializes window's context menu.
 
Initializes abp-hooks element, converts any function attributes to actual functions.
 
Makes sure the toolbar button is displayed.
 
Tests whether blockable items list is currently open.
 
Checks whether the toolbar icon is currently displayed.
 
Opens our contribution page.
 
Opens Adblock Plus menu.
 
Opens report wizard for the current page.
 
Attaches event listeners to a window represented by hooks element
 
Removes/disables the exception rule applying for the current page.
 
Toggles "Count filter hits" option.
 
Toggles open/closed state of the blockable items list.
 
Updates context menu, in particularly controls the visibility of context menu items like "Block image".
 
Updates displayed state for an application window.
Class Detail
WindowWrapper(window, hooks)
Class providing various functions related to application windows.
Parameters:
window
hooks
Field Detail
{RequestEntry} backgroundData
Data associated with the background image currently under mouse pointer (set in updateContextMenu()).

currentFrame
The frame that frameData belongs to.

currentNode
The document node that nodeData belongs to.

{Array of String} customMethods
Methods that can be defined at attributes of the hooks element.

{Window} detachedSidebar
Window of the detached list of blockable items (might be null or closed).

{Array} eventHandlers
List of event handers to be registered. For each event handler the element ID, event and the actual event handler are listed.

{RequestEntry} frameData
Data associated with the frame currently under mouse pointer (set in updateContextMenu()).

{RequestEntry} nodeData
Data associated with the node currently under mouse pointer (set in updateContextMenu()).

{Filter} pageWhitelist
Filter corresponding with "disable on site" menu item (set in fillPopup()).

{nsIProgressListener} progressListener
Progress listener used to watch for location changes, if any.

{Filter} siteWhitelist
Filter corresponding with "disable on site" menu item (set in fillPopup()).

{String} state
Current state as displayed for this window.

{Window} window
Application window this object belongs to.
Method Detail
<private> {Function} _bindMethod(method)
Binds a function to the object, ensuring that "this" pointer is always set correctly.
Parameters:
{Function} method

blockItem(node, item)
Brings up the filter composer dialog to block an item.
Parameters:
{Node} node
{RequestEntry} item

clearContextMenu(event)
Clears context menu data once the menu is closed.
Parameters:
event

configureKeys()
Sets up hotkeys for the window.

E(id)
Retrieves an element by its ID.
Parameters:
{String} id

executeAction(action)
Parameters:
action

executeFirstRunActions()
Executes window-specific first-run actions if necessary.

fillPopup(event)
Updates state of the icon context menu.
Parameters:
{Event} event

fillTooltip(event)
Updates state of the icon tooltip.
Parameters:
{Event} event

{Array} findAvailableKey(id, value, validModifiers, existing)
Finds an available hotkey for a value defined in preferences.
Parameters:
{String} id
{String} value
{Object} validModifiers
{Object} existing

fixupMenus()
Makes a copy of the ABP icon's context menu for the toolbar button.

{nsIURI} getCurrentLocation()
Retrieves the current location of the browser (might return null on failure).

getPaletteButton()
Finds the toolbar button in the toolbar palette.

handleLinkClick(event, linkTarget)
Handles browser clicks to intercept clicks on abp: links. This can be called either with an event object or with the link target (if it is the former then link target will be retrieved from event target).
Parameters:
{Event} event
{String} linkTarget

handleStatusClick(event)
Handles click events on status bar icon.
Parameters:
{Event} event

handleToolbarClick(event)
Handles click events on toolbar icon.
Parameters:
{Event} event

handleToolbarCommand(event)
Handles command events on toolbar icon.
Parameters:
event

hideContributeButton(event)
Hide contribute button and persist this choice.
Parameters:
event

hideToolbarIcon()
Removes toolbar button from the toolbar.

initContextMenu()
Initializes window's context menu.

initializeHooks(hooks)
Initializes abp-hooks element, converts any function attributes to actual functions.
Parameters:
hooks

installToolbarIcon()
Makes sure the toolbar button is displayed.

{Boolean} isSidebarOpen()
Tests whether blockable items list is currently open.

isToolbarIconVisible()
Checks whether the toolbar icon is currently displayed.

openContributePage()
Opens our contribution page.

openMenu()
Opens Adblock Plus menu.

openReportDialog()
Opens report wizard for the current page.

registerEventListeners()
Attaches event listeners to a window represented by hooks element

removeWhitelist()
Removes/disables the exception rule applying for the current page.

toggleSaveStats()
Toggles "Count filter hits" option.

toggleSidebar()
Toggles open/closed state of the blockable items list.

updateContextMenu(event)
Updates context menu, in particularly controls the visibility of context menu items like "Block image".
Parameters:
event

updateState()
Updates displayed state for an application window.

Documentation generated by JsDoc Toolkit 2.3.2 on Wed May 09 2012 10:50:20 GMT+0000 (UTC)