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

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

Issue 1681463003: Preference for Presentation Mode/Fullscreen Toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #endif 425 #endif
426 426
427 ExclusiveAccessContext* const exclusive_access_context = 427 ExclusiveAccessContext* const exclusive_access_context =
428 exclusive_access_manager()->context(); 428 exclusive_access_manager()->context();
429 bool enter_fullscreen = !exclusive_access_context->IsFullscreen(); 429 bool enter_fullscreen = !exclusive_access_context->IsFullscreen();
430 430
431 // When a Mac user requests a toggle they may be toggling between 431 // When a Mac user requests a toggle they may be toggling between
432 // FullscreenWithoutChrome and FullscreenWithToolbar. 432 // FullscreenWithoutChrome and FullscreenWithToolbar.
433 if (exclusive_access_context->IsFullscreen() && 433 if (exclusive_access_context->IsFullscreen() &&
434 !IsWindowFullscreenForTabOrPending() && 434 !IsWindowFullscreenForTabOrPending() &&
435 exclusive_access_context->SupportsFullscreenWithToolbar()) { 435 exclusive_access_context->SupportsFullscreenWithToolbar() &&
436 IsExtensionFullscreenOrPending()) {
436 if (option == BROWSER_WITH_TOOLBAR) { 437 if (option == BROWSER_WITH_TOOLBAR) {
437 enter_fullscreen = enter_fullscreen || 438 enter_fullscreen = enter_fullscreen ||
438 !exclusive_access_context->IsFullscreenWithToolbar(); 439 !exclusive_access_context->IsFullscreenWithToolbar();
439 } else { 440 } else {
440 enter_fullscreen = enter_fullscreen || 441 enter_fullscreen = enter_fullscreen ||
441 exclusive_access_context->IsFullscreenWithToolbar(); 442 exclusive_access_context->IsFullscreenWithToolbar();
442 } 443 }
443 } 444 }
444 445
445 // In kiosk mode, we always want to be fullscreen. When the browser first 446 // In kiosk mode, we always want to be fullscreen. When the browser first
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 return fullscreened_origin_; 598 return fullscreened_origin_;
598 599
599 return exclusive_access_tab()->GetLastCommittedURL(); 600 return exclusive_access_tab()->GetLastCommittedURL();
600 } 601 }
601 602
602 GURL FullscreenController::GetEmbeddingOrigin() const { 603 GURL FullscreenController::GetEmbeddingOrigin() const {
603 DCHECK(exclusive_access_tab()); 604 DCHECK(exclusive_access_tab());
604 605
605 return exclusive_access_tab()->GetLastCommittedURL(); 606 return exclusive_access_tab()->GetLastCommittedURL();
606 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698