1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_LENS_LENS_OVERLAY_DISMISSAL_SOURCE_H_
#define COMPONENTS_LENS_LENS_OVERLAY_DISMISSAL_SOURCE_H_
namespace lens {
// Designates the source of any lens overlay dismissal (in other words, any
// call to `LensOverlayController:CloseUI()`).
//
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(LensOverlayDismissalSource)
enum class LensOverlayDismissalSource {
// The overlay close button (shown when in the kOverlay state).
kOverlayCloseButton = 0,
// A click on the background scrim (shown when in the kOverlayAndResults
// state). Only used on Desktop.
kOverlayBackgroundClick = 1,
// The close button in the side panel. Only used on Desktop.
kSidePanelCloseButton = 2,
// The pinned toolbar action button. Only used on Desktop.
kToolbar = 3,
// The page in the primary web contents changed (link clicked, back button,
// etc.). Only used on Desktop.
kPageChanged = 4,
// The contents of the associated tab were in the background and discarded
// to save memory. Only used on Desktop.
kTabContentsDiscarded = 5,
// The current tab was backgrounded before the screenshot was created. Only
// used on Desktop.
kTabBackgroundedWhileScreenshotting = 6,
// Creating a screenshot from the view of the web contents failed.
kErrorScreenshotCreationFailed = 7,
// Encoding the screenshot failed. Only used on Desktop.
kErrorScreenshotEncodingFailed = 8,
// User pressed the escape key. Only used on Desktop.
kEscapeKeyPress = 9,
// Another side panel opened forcing our overlay to close. Only used on
// Desktop.
kUnexpectedSidePanelOpen = 10,
// The browser entered fullscreen. Only used on Desktop.
kFullscreened = 11,
// The tab was dragged into a new window. Only used on Desktop.
kTabDragNewWindow = 12,
// The tab was closed.
kTabClosed = 13,
// Obsolete: Renderer closed unexpectedly (ex. renderer crashed).
// Unused, replaced by the kOverlayRendererClosed* and
// kPageRendererClosed* values below. Only used on Desktop.
kRendererClosedObsolete = 14,
// The user started finding text on the page underneath. Only used on Desktop.
kFindInPageInvoked = 15,
// The user clicked exit on the preselection toast. Only used on Desktop.
kPreselectionToastExitButton = 16,
// The user opened a new side panel entry that replaced the
// Lens overlay. Only used on Desktop.
kSidePanelEntryReplaced = 17,
// The close button in the search bubble. Only used on Desktop.
kSearchBubbleCloseButton = 18,
// The overlay's renderer process closed normally. Only used on Desktop.
kOverlayRendererClosedNormally = 19,
// The overlay's renderer process closed due to some error. Only used on
// Desktop.
kOverlayRendererClosedUnexpectedly = 20,
// The underlying page's renderer process closed normally. Only used on
// Desktop.
kPageRendererClosedNormally = 21,
// The underlying page's renderer process closed due to some error. Only used
// on Desktop.
kPageRendererClosedUnexpectedly = 22,
// The new default search engine doesn't support Lens. Only used on iOS.
kDefaultSearchEngineChange = 23,
// The bottom sheet (iOS) has been dismissed. Only used on iOS.
kBottomSheetDismissed = 24,
// Close with the accessibility gesture. Only used on iOS.
kAccessibilityEscapeGesture = 25,
// New Lens overlay invocation in another tab. (iOS only support once instance
// of Lens overlay). Only used on iOS.
kNewLensInvocation = 26,
// Lens permissions have been denied. Only used on iOS.
kLensPermissionsDenied = 27,
// Lens overlay closed due to low memory warning. Only used on iOS.
kLowMemory = 28,
// Lens overlay closed due to network issues. Only used on iOS. (the Lens UI
// becomes unresponsive with slow connection).
kNetworkIssue = 29,
// The user pressed the escape key while focused on the preselection toast.
// Only used on Desktop.
kPreselectionToastEscapeKeyPress = 30,
// The user chose to switch the mode to "Search with camera", causing the
// overlay to close.
kSearchWithCameraRequested = 31,
kMaxValue = kSearchWithCameraRequested
};
// LINT.ThenChange(//tools/metrics/histograms/metadata/lens/enums.xml:LensOverlayDismissalSource)
} // namespace lens
#endif // COMPONENTS_LENS_LENS_OVERLAY_DISMISSAL_SOURCE_H_
|