Android: Makes SelectionPopupController init simpler
Embedders have to do a bit convoluted initialization for
SelectionPopupController (its action mode callback to be set
requires a helper instance from the SPC itself). This CL makes
it simpler by delegating the helper initialization to
action mode callback constructor.
|ceateContentViewCore| in Tab.java, For instance:
From:
SelectionPopupController controller = SelectionPopupController.fromWebContents(webContents);
ChromeActionModeCallback actionModeCallback =
    new ChromeActionModeCallback(this, controller.getActionModeCallbackHelper());
controller.setActionModeCallback(actionModeCallback);
SelectionPopupController.fromWebContents(webContents)
    setActionModeCallback(new ChromeActionModeCallback(this, webContents));
to: 
Change-Id: Ifec52ce2c1f9446f47de72295be1abc5e1c361d7
Reviewed-on: https://chromium-review.googlesource.com/1029757Reviewed-by:  Ted Choc <tedchoc@chromium.org>
Reviewed-by:
Ted Choc <tedchoc@chromium.org>
Reviewed-by:  Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556037}
Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556037}
Showing
Please register or sign in to comment