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

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: Added link to discussion bug 515747. 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.
513 // TODO(mgiuca): Should we allow the user to block use of fullscreen?
514 // http://crbug.com/515747.
515 if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
516 return CONTENT_SETTING_ALLOW;
517
512 GURL url = GetRequestingOrigin(); 518 GURL url = GetRequestingOrigin();
513 519
514 // Always ask on file:// URLs, since we can't meaningfully make the 520 // Always ask on file:// URLs, since we can't meaningfully make the
515 // decision stick for a particular origin. 521 // decision stick for a particular origin.
516 // TODO(estark): Revisit this when crbug.com/455882 is fixed. 522 // TODO(estark): Revisit this when crbug.com/455882 is fixed.
517 if (url.SchemeIsFile()) 523 if (url.SchemeIsFile())
518 return CONTENT_SETTING_ASK; 524 return CONTENT_SETTING_ASK;
519 525
520 if (IsPrivilegedFullscreenForTab()) 526 if (IsPrivilegedFullscreenForTab())
521 return CONTENT_SETTING_ALLOW; 527 return CONTENT_SETTING_ALLOW;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return fullscreened_origin_; 600 return fullscreened_origin_;
595 601
596 return exclusive_access_tab()->GetLastCommittedURL(); 602 return exclusive_access_tab()->GetLastCommittedURL();
597 } 603 }
598 604
599 GURL FullscreenController::GetEmbeddingOrigin() const { 605 GURL FullscreenController::GetEmbeddingOrigin() const {
600 DCHECK(exclusive_access_tab()); 606 DCHECK(exclusive_access_tab());
601 607
602 return exclusive_access_tab()->GetLastCommittedURL(); 608 return exclusive_access_tab()->GetLastCommittedURL();
603 } 609 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698