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

Side by Side Diff: chrome/browser/ui/exclusive_access/exclusive_access_manager.cc

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: Moved histogram recording into each subclass. (Fix DCHECK / incorrect histogram recording.) 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" 5 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/app_mode/app_mode_utils.h" 9 #include "chrome/browser/app_mode/app_mode_utils.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 bool updateBubble = mouse_lock_controller_.OnDenyExclusiveAccessPermission(); 143 bool updateBubble = mouse_lock_controller_.OnDenyExclusiveAccessPermission();
144 updateBubble |= fullscreen_controller_.OnDenyExclusiveAccessPermission(); 144 updateBubble |= fullscreen_controller_.OnDenyExclusiveAccessPermission();
145 if (updateBubble) 145 if (updateBubble)
146 UpdateExclusiveAccessExitBubbleContent(); 146 UpdateExclusiveAccessExitBubbleContent();
147 } 147 }
148 148
149 void ExclusiveAccessManager::ExitExclusiveAccess() { 149 void ExclusiveAccessManager::ExitExclusiveAccess() {
150 fullscreen_controller_.ExitExclusiveAccessToPreviousState(); 150 fullscreen_controller_.ExitExclusiveAccessToPreviousState();
151 mouse_lock_controller_.LostMouseLock(); 151 mouse_lock_controller_.LostMouseLock();
152 } 152 }
153
154 void ExclusiveAccessManager::RecordBubbleReshownUMA(
155 ExclusiveAccessBubbleType type) {
156 // Figure out whether each of fullscreen, mouselock is in effect.
157 bool fullscreen = false;
158 bool mouselock = false;
159 switch (type) {
160 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE:
161 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_BUTTONS:
162 // None in effect.
163 break;
164 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_BUTTONS:
165 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION:
166 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION:
167 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION:
168 // Only fullscreen in effect.
169 fullscreen = true;
170 break;
171 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_EXIT_INSTRUCTION:
172 // Only mouselock in effect.
173 mouselock = true;
174 break;
175 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS:
176 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_EXIT_INSTRUCTION:
177 // Both in effect.
178 fullscreen = true;
179 mouselock = true;
180 break;
181 }
182
183 if (fullscreen)
184 fullscreen_controller_.RecordBubbleReshownUMA();
185 if (mouselock)
186 mouse_lock_controller_.RecordBubbleReshownUMA();
187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698