Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7708)

Unified Diff: chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h

Issue 1721633002: Added UMA collection for fullscreen / mouse lock bubble re-shows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
index 11e8e0d19d1fb207945f30716dfe012c7d315c9b..a167def026fedd4d80da3766eee654db81572051 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
@@ -65,6 +65,12 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
+ // For recording UMA.
+ // Called when the bubble UI is reshown after a timeout.
+ void BubbleReshown();
+ // For recording UMA. Called when the exclusive access session ends.
+ void Exiting();
+
protected:
void SetTabWithExclusiveAccess(content::WebContents* tab);
@@ -77,6 +83,9 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
// if necessary.
virtual void NotifyTabExclusiveAccessLost() = 0;
+ // Prefix used in the name of histograms relating to this type of controller.
+ virtual const char* HistogramPrefix() = 0;
+
private:
void UpdateNotificationRegistrations();
@@ -84,7 +93,10 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
- content::WebContents* tab_with_exclusive_access_;
+ content::WebContents* tab_with_exclusive_access_ = nullptr;
+
+ // The number of bubble re-shows for the current session (reset upon exiting).
+ int bubble_reshow_count_ = 0;
DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessControllerBase);
};

Powered by Google App Engine
This is Rietveld 408576698