org.chromium.chrome.browser.widget.findinpage.FindToolbarObserver Java Examples

The following examples show how to use org.chromium.chrome.browser.widget.findinpage.FindToolbarObserver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReaderModeManager.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * @return A FindToolbarObserver capable of hiding the Reader Mode panel.
 */
public FindToolbarObserver getFindToolbarObserver() {
    return new FindToolbarObserver() {
        @Override
        public void onFindToolbarShown() {
            mIsFindToolbarShowing = true;
            closeReaderPanel(StateChangeReason.UNKNOWN, true);
        }

        @Override
        public void onFindToolbarHidden() {
            mIsFindToolbarShowing = false;
            requestReaderPanelShow(StateChangeReason.UNKNOWN);
        }
    };
}
 
Example #2
Source File: ReaderModeManager.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
/**
 * @return A FindToolbarObserver capable of hiding the Reader Mode panel.
 */
public FindToolbarObserver getFindToolbarObserver() {
    return new FindToolbarObserver() {
        @Override
        public void onFindToolbarShown() {
            mIsFindToolbarShowing = true;
            closeReaderPanel(StateChangeReason.UNKNOWN, true);
        }

        @Override
        public void onFindToolbarHidden() {
            mIsFindToolbarShowing = false;
            requestReaderPanelShow(StateChangeReason.UNKNOWN);
        }
    };
}
 
Example #3
Source File: ReaderModeManager.java    From 365browser with Apache License 2.0 6 votes vote down vote up
/**
 * @return A FindToolbarObserver capable of hiding the Reader Mode panel.
 */
public FindToolbarObserver getFindToolbarObserver() {
    return new FindToolbarObserver() {
        @Override
        public void onFindToolbarShown() {
            mIsFindToolbarShowing = true;
            closeReaderPanel(StateChangeReason.UNKNOWN, true);
        }

        @Override
        public void onFindToolbarHidden() {
            mIsFindToolbarShowing = false;
            requestReaderPanelShow(StateChangeReason.UNKNOWN);
        }
    };
}
 
Example #4
Source File: ToolbarManager.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Add an observer to the FindToolbarManager.
 * @param observer The observer to add.
 */
public void addFindToolbarObserver(FindToolbarObserver observer) {
    // Keep a list of all added observers in case the manager does not exist yet.
    mFindToolbarObservers.add(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.addObserver(observer);
    }
}
 
Example #5
Source File: ToolbarManager.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Remove an observer from the FindToolbarManager.
 * @param observer The observer to remove.
 */
public void removeFindToolbarObserver(FindToolbarObserver observer) {
    mFindToolbarObservers.remove(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.removeObserver(observer);
    }
}
 
Example #6
Source File: ToolbarManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Add an observer to the FindToolbarManager.
 * @param observer The observer to add.
 */
public void addFindToolbarObserver(FindToolbarObserver observer) {
    // Keep a list of all added observers in case the manager does not exist yet.
    mFindToolbarObservers.add(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.addObserver(observer);
    }
}
 
Example #7
Source File: ToolbarManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Remove an observer from the FindToolbarManager.
 * @param observer The observer to remove.
 */
public void removeFindToolbarObserver(FindToolbarObserver observer) {
    mFindToolbarObservers.remove(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.removeObserver(observer);
    }
}
 
Example #8
Source File: ToolbarManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Add an observer to the FindToolbarManager.
 * @param observer The observer to add.
 */
public void addFindToolbarObserver(FindToolbarObserver observer) {
    // Keep a list of all added observers in case the manager does not exist yet.
    mFindToolbarObservers.add(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.addObserver(observer);
    }
}
 
Example #9
Source File: ToolbarManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Remove an observer from the FindToolbarManager.
 * @param observer The observer to remove.
 */
public void removeFindToolbarObserver(FindToolbarObserver observer) {
    mFindToolbarObservers.remove(observer);
    if (mFindToolbarManager != null) {
        mFindToolbarManager.removeObserver(observer);
    }
}