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

Side by Side Diff: chrome/browser/ui/exclusive_access/fullscreen_controller.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: 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fullscreen_controller.h" 5 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 SetTabWithExclusiveAccess(nullptr); 413 SetTabWithExclusiveAccess(nullptr);
414 fullscreened_origin_ = GURL(); 414 fullscreened_origin_ = GURL();
415 bool will_cause_resize = IsFullscreenCausedByTab(); 415 bool will_cause_resize = IsFullscreenCausedByTab();
416 state_prior_to_tab_fullscreen_ = STATE_INVALID; 416 state_prior_to_tab_fullscreen_ = STATE_INVALID;
417 tab_fullscreen_accepted_ = false; 417 tab_fullscreen_accepted_ = false;
418 web_contents->ExitFullscreen(will_cause_resize); 418 web_contents->ExitFullscreen(will_cause_resize);
419 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent(); 419 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent();
420 } 420 }
421 } 421 }
422 422
423 const char* FullscreenController::HistogramPrefix() {
424 return "Fullscreen";
425 }
426
423 void FullscreenController::ToggleFullscreenModeInternal( 427 void FullscreenController::ToggleFullscreenModeInternal(
424 FullscreenInternalOption option) { 428 FullscreenInternalOption option) {
425 #if defined(OS_WIN) 429 #if defined(OS_WIN)
426 // When in Metro snap mode, toggling in and out of fullscreen is prevented. 430 // When in Metro snap mode, toggling in and out of fullscreen is prevented.
427 if (IsInMetroSnapMode()) 431 if (IsInMetroSnapMode())
428 return; 432 return;
429 #endif 433 #endif
430 434
431 ExclusiveAccessContext* const exclusive_access_context = 435 ExclusiveAccessContext* const exclusive_access_context =
432 exclusive_access_manager()->context(); 436 exclusive_access_manager()->context();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 496
493 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent(); 497 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent();
494 498
495 // Once the window has become fullscreen it'll call back to 499 // Once the window has become fullscreen it'll call back to
496 // WindowFullscreenStateChanged(). We don't do this immediately as 500 // WindowFullscreenStateChanged(). We don't do this immediately as
497 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let 501 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let
498 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate. 502 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate.
499 } 503 }
500 504
501 void FullscreenController::ExitFullscreenModeInternal() { 505 void FullscreenController::ExitFullscreenModeInternal() {
506 Exiting();
502 toggled_into_fullscreen_ = false; 507 toggled_into_fullscreen_ = false;
503 #if defined(OS_MACOSX) 508 #if defined(OS_MACOSX)
504 // Mac windows report a state change instantly, and so we must also clear 509 // Mac windows report a state change instantly, and so we must also clear
505 // state_prior_to_tab_fullscreen_ to match them else other logic using 510 // state_prior_to_tab_fullscreen_ to match them else other logic using
506 // state_prior_to_tab_fullscreen_ will be incorrect. 511 // state_prior_to_tab_fullscreen_ will be incorrect.
507 NotifyTabExclusiveAccessLost(); 512 NotifyTabExclusiveAccessLost();
508 #endif 513 #endif
509 exclusive_access_manager()->context()->ExitFullscreen(); 514 exclusive_access_manager()->context()->ExitFullscreen();
510 extension_caused_fullscreen_ = GURL(); 515 extension_caused_fullscreen_ = GURL();
511 516
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 return fullscreened_origin_; 607 return fullscreened_origin_;
603 608
604 return exclusive_access_tab()->GetLastCommittedURL(); 609 return exclusive_access_tab()->GetLastCommittedURL();
605 } 610 }
606 611
607 GURL FullscreenController::GetEmbeddingOrigin() const { 612 GURL FullscreenController::GetEmbeddingOrigin() const {
608 DCHECK(exclusive_access_tab()); 613 DCHECK(exclusive_access_tab());
609 614
610 return exclusive_access_tab()->GetLastCommittedURL(); 615 return exclusive_access_tab()->GetLastCommittedURL();
611 } 616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698