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

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

Issue 1461463002: Reland fix for thumbnail generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework IsFullscreenForTabOrPending() (per mia@). Created 4 years, 11 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool FullscreenController::IsControllerInitiatedFullscreen() const { 86 bool FullscreenController::IsControllerInitiatedFullscreen() const {
87 return toggled_into_fullscreen_; 87 return toggled_into_fullscreen_;
88 } 88 }
89 89
90 bool FullscreenController::IsUserAcceptedFullscreen() const { 90 bool FullscreenController::IsUserAcceptedFullscreen() const {
91 return tab_fullscreen_accepted_; 91 return tab_fullscreen_accepted_;
92 } 92 }
93 93
94 bool FullscreenController::IsFullscreenForTabOrPending( 94 bool FullscreenController::IsFullscreenForTabOrPending(
95 const WebContents* web_contents) const { 95 const WebContents* web_contents) const {
96 if (IsFullscreenForCapturedTab(web_contents))
97 return true;
96 if (web_contents == exclusive_access_tab()) { 98 if (web_contents == exclusive_access_tab()) {
97 DCHECK(web_contents == 99 DCHECK(web_contents ==
98 exclusive_access_manager()->context()->GetActiveWebContents()); 100 exclusive_access_manager()->context()->GetActiveWebContents());
99 DCHECK(web_contents->GetCapturerCount() == 0);
100 return true; 101 return true;
101 } 102 }
102 return IsFullscreenForCapturedTab(web_contents); 103 return false;
103 } 104 }
104 105
105 bool FullscreenController::IsFullscreenCausedByTab() const { 106 bool FullscreenController::IsFullscreenCausedByTab() const {
106 return state_prior_to_tab_fullscreen_ == STATE_NORMAL; 107 return state_prior_to_tab_fullscreen_ == STATE_NORMAL;
107 } 108 }
108 109
109 void FullscreenController::EnterFullscreenModeForTab(WebContents* web_contents, 110 void FullscreenController::EnterFullscreenModeForTab(WebContents* web_contents,
110 const GURL& origin) { 111 const GURL& origin) {
111 DCHECK(web_contents); 112 DCHECK(web_contents);
112 113
(...skipping 484 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
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_tab_helper.cc ('k') | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698