| OLD | NEW |
| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 #endif | 429 #endif |
| 430 | 430 |
| 431 ExclusiveAccessContext* const exclusive_access_context = | 431 ExclusiveAccessContext* const exclusive_access_context = |
| 432 exclusive_access_manager()->context(); | 432 exclusive_access_manager()->context(); |
| 433 bool enter_fullscreen = !exclusive_access_context->IsFullscreen(); | 433 bool enter_fullscreen = !exclusive_access_context->IsFullscreen(); |
| 434 | 434 |
| 435 // When a Mac user requests a toggle they may be toggling between | 435 // When a Mac user requests a toggle they may be toggling between |
| 436 // FullscreenWithoutChrome and FullscreenWithToolbar. | 436 // FullscreenWithoutChrome and FullscreenWithToolbar. |
| 437 if (exclusive_access_context->IsFullscreen() && | 437 if (exclusive_access_context->IsFullscreen() && |
| 438 !IsWindowFullscreenForTabOrPending() && | 438 !IsWindowFullscreenForTabOrPending() && |
| 439 exclusive_access_context->SupportsFullscreenWithToolbar()) { | 439 exclusive_access_context->SupportsFullscreenWithToolbar() && |
| 440 IsExtensionFullscreenOrPending()) { |
| 440 if (option == BROWSER_WITH_TOOLBAR) { | 441 if (option == BROWSER_WITH_TOOLBAR) { |
| 441 enter_fullscreen = enter_fullscreen || | 442 enter_fullscreen = enter_fullscreen || |
| 442 !exclusive_access_context->IsFullscreenWithToolbar(); | 443 !exclusive_access_context->IsFullscreenWithToolbar(); |
| 443 } else { | 444 } else { |
| 444 enter_fullscreen = enter_fullscreen || | 445 enter_fullscreen = enter_fullscreen || |
| 445 exclusive_access_context->IsFullscreenWithToolbar(); | 446 exclusive_access_context->IsFullscreenWithToolbar(); |
| 446 } | 447 } |
| 447 } | 448 } |
| 448 | 449 |
| 449 // In kiosk mode, we always want to be fullscreen. When the browser first | 450 // 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 Loading... |
| 601 return fullscreened_origin_; | 602 return fullscreened_origin_; |
| 602 | 603 |
| 603 return exclusive_access_tab()->GetLastCommittedURL(); | 604 return exclusive_access_tab()->GetLastCommittedURL(); |
| 604 } | 605 } |
| 605 | 606 |
| 606 GURL FullscreenController::GetEmbeddingOrigin() const { | 607 GURL FullscreenController::GetEmbeddingOrigin() const { |
| 607 DCHECK(exclusive_access_tab()); | 608 DCHECK(exclusive_access_tab()); |
| 608 | 609 |
| 609 return exclusive_access_tab()->GetLastCommittedURL(); | 610 return exclusive_access_tab()->GetLastCommittedURL(); |
| 610 } | 611 } |
| OLD | NEW |