Java Code Examples for org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason#BASE_PAGE_TAP
The following examples show how to use
org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason#BASE_PAGE_TAP .
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: ContextualSearchUma.java From delion with Apache License 2.0 | 5 votes |
/** * Logs a user action for a change to the Panel state, which allows sequencing of actions. * @param toState The state to transition to. * @param reason The reason for the state transition. */ public static void logPanelStateUserAction(PanelState toState, StateChangeReason reason) { switch (toState) { case CLOSED: if (reason == StateChangeReason.BACK_PRESS) { RecordUserAction.record("ContextualSearch.BackPressClose"); } else if (reason == StateChangeReason.CLOSE_BUTTON) { RecordUserAction.record("ContextualSearch.CloseButtonClose"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingClose"); } else if (reason == StateChangeReason.TAB_PROMOTION) { RecordUserAction.record("ContextualSearch.TabPromotionClose"); } else if (reason == StateChangeReason.BASE_PAGE_TAP) { RecordUserAction.record("ContextualSearch.BasePageTapClose"); } else if (reason == StateChangeReason.BASE_PAGE_SCROLL) { RecordUserAction.record("ContextualSearch.BasePageScrollClose"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapClose"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationClose"); } else { RecordUserAction.record("ContextualSearch.UncommonClose"); } break; case PEEKED: if (reason == StateChangeReason.TEXT_SELECT_TAP) { RecordUserAction.record("ContextualSearch.TapPeek"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingPeek"); } else if (reason == StateChangeReason.TEXT_SELECT_LONG_PRESS) { RecordUserAction.record("ContextualSearch.LongpressPeek"); } break; case EXPANDED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingExpand"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapExpand"); } break; case MAXIMIZED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingMaximize"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationMaximize"); } break; default: break; } }
Example 2
Source File: ContextualSearchUma.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * Logs a user action for a change to the Panel state, which allows sequencing of actions. * @param toState The state to transition to. * @param reason The reason for the state transition. */ public static void logPanelStateUserAction(PanelState toState, StateChangeReason reason) { switch (toState) { case CLOSED: if (reason == StateChangeReason.BACK_PRESS) { RecordUserAction.record("ContextualSearch.BackPressClose"); } else if (reason == StateChangeReason.CLOSE_BUTTON) { RecordUserAction.record("ContextualSearch.CloseButtonClose"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingClose"); } else if (reason == StateChangeReason.TAB_PROMOTION) { RecordUserAction.record("ContextualSearch.TabPromotionClose"); } else if (reason == StateChangeReason.BASE_PAGE_TAP) { RecordUserAction.record("ContextualSearch.BasePageTapClose"); } else if (reason == StateChangeReason.BASE_PAGE_SCROLL) { RecordUserAction.record("ContextualSearch.BasePageScrollClose"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapClose"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationClose"); } else { RecordUserAction.record("ContextualSearch.UncommonClose"); } break; case PEEKED: if (reason == StateChangeReason.TEXT_SELECT_TAP) { RecordUserAction.record("ContextualSearch.TapPeek"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingPeek"); } else if (reason == StateChangeReason.TEXT_SELECT_LONG_PRESS) { RecordUserAction.record("ContextualSearch.LongpressPeek"); } break; case EXPANDED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingExpand"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapExpand"); } break; case MAXIMIZED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingMaximize"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationMaximize"); } break; default: break; } }
Example 3
Source File: ContextualSearchUma.java From 365browser with Apache License 2.0 | 4 votes |
/** * Logs a user action for a change to the Panel state, which allows sequencing of actions. * @param toState The state to transition to. * @param reason The reason for the state transition. */ public static void logPanelStateUserAction(PanelState toState, StateChangeReason reason) { switch (toState) { case CLOSED: if (reason == StateChangeReason.BACK_PRESS) { RecordUserAction.record("ContextualSearch.BackPressClose"); } else if (reason == StateChangeReason.CLOSE_BUTTON) { RecordUserAction.record("ContextualSearch.CloseButtonClose"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingClose"); } else if (reason == StateChangeReason.TAB_PROMOTION) { RecordUserAction.record("ContextualSearch.TabPromotionClose"); } else if (reason == StateChangeReason.BASE_PAGE_TAP) { RecordUserAction.record("ContextualSearch.BasePageTapClose"); } else if (reason == StateChangeReason.BASE_PAGE_SCROLL) { RecordUserAction.record("ContextualSearch.BasePageScrollClose"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapClose"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationClose"); } else { RecordUserAction.record("ContextualSearch.UncommonClose"); } break; case PEEKED: if (reason == StateChangeReason.TEXT_SELECT_TAP) { RecordUserAction.record("ContextualSearch.TapPeek"); } else if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingPeek"); } else if (reason == StateChangeReason.TEXT_SELECT_LONG_PRESS) { RecordUserAction.record("ContextualSearch.LongpressPeek"); } break; case EXPANDED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingExpand"); } else if (reason == StateChangeReason.SEARCH_BAR_TAP) { RecordUserAction.record("ContextualSearch.SearchBarTapExpand"); } break; case MAXIMIZED: if (reason == StateChangeReason.SWIPE || reason == StateChangeReason.FLING) { RecordUserAction.record("ContextualSearch.SwipeOrFlingMaximize"); } else if (reason == StateChangeReason.SERP_NAVIGATION) { RecordUserAction.record("ContextualSearch.NavigationMaximize"); } break; default: break; } }