Refactor IncognitoToggleButtonTablet

IncognitoToggleButtonTablet implements a button we have in the Android tablet
toolbar that lets a user switch between normal and incognito modes. The button
only shows if there's at least one incognito tab currently open.

I want to add a similar button to the toolbar on Android phones as part of the
horizontal tab switcher experiment. The button won't need as much functionality
on phones (we want to always show it, not only when an incognito tab is open,
and the click handler will get passed from StackLayout through ToolbarPhone to
the incognito button, so we can have StackLayout disable it during animations).
This CL refactors the basic functionality into a new base class
IncognitoToggleButton, which we can use on phones. IncognitoToggleButtonTablet
will now extend this class so as to maintain the current functionality.

Bug: 828224
Change-Id: I453be95f42d7baef0d5e237c61bc14f7af7faba2
Reviewed-on: https://chromium-review.googlesource.com/1058433
Reviewed-by: Theresa <[email protected]>
Commit-Queue: Ryan Landay <[email protected]>
Cr-Commit-Position: refs/heads/master@{#558533}
3 files changed