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

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

Issue 1252503007: Added flag simplified-fullscreen-ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete rewrite; add flag and just remove prompting behind the flag. Created 5 years, 4 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 #endif 502 #endif
503 exclusive_access_manager()->context()->ExitFullscreen(); 503 exclusive_access_manager()->context()->ExitFullscreen();
504 extension_caused_fullscreen_ = GURL(); 504 extension_caused_fullscreen_ = GURL();
505 505
506 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent(); 506 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent();
507 } 507 }
508 508
509 ContentSetting FullscreenController::GetFullscreenSetting() const { 509 ContentSetting FullscreenController::GetFullscreenSetting() const {
510 DCHECK(exclusive_access_tab()); 510 DCHECK(exclusive_access_tab());
511 511
512 // If simplified UI is enabled, never ask the user, just auto-allow.
scheib 2015/07/30 18:32:27 I must be rusty on this, but, woah, why doesn't fu
Matt Giuca 2015/07/31 03:12:50 Interesting. Well I just filed http://crbug.com/51
513 if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
514 return CONTENT_SETTING_ALLOW;
515
512 GURL url = GetRequestingOrigin(); 516 GURL url = GetRequestingOrigin();
513 517
514 // Always ask on file:// URLs, since we can't meaningfully make the 518 // Always ask on file:// URLs, since we can't meaningfully make the
515 // decision stick for a particular origin. 519 // decision stick for a particular origin.
516 // TODO(estark): Revisit this when crbug.com/455882 is fixed. 520 // TODO(estark): Revisit this when crbug.com/455882 is fixed.
517 if (url.SchemeIsFile()) 521 if (url.SchemeIsFile())
518 return CONTENT_SETTING_ASK; 522 return CONTENT_SETTING_ASK;
519 523
520 if (IsPrivilegedFullscreenForTab()) 524 if (IsPrivilegedFullscreenForTab())
521 return CONTENT_SETTING_ALLOW; 525 return CONTENT_SETTING_ALLOW;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return fullscreened_origin_; 598 return fullscreened_origin_;
595 599
596 return exclusive_access_tab()->GetLastCommittedURL(); 600 return exclusive_access_tab()->GetLastCommittedURL();
597 } 601 }
598 602
599 GURL FullscreenController::GetEmbeddingOrigin() const { 603 GURL FullscreenController::GetEmbeddingOrigin() const {
600 DCHECK(exclusive_access_tab()); 604 DCHECK(exclusive_access_tab());
601 605
602 return exclusive_access_tab()->GetLastCommittedURL(); 606 return exclusive_access_tab()->GetLastCommittedURL();
603 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698