Example usage for com.google.gwt.chrome.crx.client Tabs getOnUpdatedEvent

List of usage examples for com.google.gwt.chrome.crx.client Tabs getOnUpdatedEvent

Introduction

In this page you can find the example usage for com.google.gwt.chrome.crx.client Tabs getOnUpdatedEvent.

Prototype

public static native TabUpdatedEvent getOnUpdatedEvent() ;

Source Link

Usage

From source file:com.google.speedtracer.client.BackgroundPage.java

License:Apache License

private void listenForTabEvents() {
    // We need to keep the browser action icon consistent.
    Tabs.getOnUpdatedEvent().addListener(new TabUpdatedEvent.Listener() {
        public void onTabUpdated(int tabId, ChangeInfo changeInfo, Tab tab) {
            if (changeInfo.getStatus().equals(ChangeInfo.STATUS_LOADING)) {
                TabModel tabModel = browserConnectionMap.get(CHROME_BROWSER_ID).tabMap.get(tabId);
                if (tabModel != null) {
                    // We want the icon to remain what it was before the page
                    // transition.
                    setBrowserActionIcon(tabId, tabModel.currentIcon, tabModel);
                }//ww w  .j a  v  a  2s .c o  m
            }
        }
    });
}