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

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: Rename FullscreenBubbleReshowsPerSession to BubbleReshowsPerSession.Fullscreen. 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::BubbleReshown(ExclusiveAccessBubbleType type) {
155 // Figure out whether each of fullscreen, mouselock is in effect.
156 bool fullscreen = false;
157 bool mouselock = false;
158 switch (type) {
159 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE:
160 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_BUTTONS:
161 // None in effect.
162 break;
163 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_BUTTONS:
164 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION:
165 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION:
166 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION:
167 // Only fullscreen in effect.
168 fullscreen = true;
169 break;
170 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_EXIT_INSTRUCTION:
171 // Only mouselock in effect.
172 mouselock = true;
173 break;
174 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS:
175 case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_EXIT_INSTRUCTION:
176 // Both in effect.
177 fullscreen = true;
178 mouselock = true;
179 break;
180 }
181
182 if (fullscreen)
183 fullscreen_controller_.BubbleReshown();
184 if (mouselock)
185 mouse_lock_controller_.BubbleReshown();
186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698