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

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

Issue 158253002: Tabs being screen-captured will fullscreen within their tab contents area. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK to make sure tab capture isn't started after tab fullscreen. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/fullscreen/fullscreen_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 // Update the bookmark state, since the BrowserWindow may query it during 974 // Update the bookmark state, since the BrowserWindow may query it during
975 // OnActiveTabChanged() below. 975 // OnActiveTabChanged() below.
976 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH); 976 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH);
977 977
978 // Let the BrowserWindow do its handling. On e.g. views this changes the 978 // Let the BrowserWindow do its handling. On e.g. views this changes the
979 // focused object, which should happen before we update the toolbar below, 979 // focused object, which should happen before we update the toolbar below,
980 // since the omnibox expects the correct element to already be focused when it 980 // since the omnibox expects the correct element to already be focused when it
981 // is updated. 981 // is updated.
982 window_->OnActiveTabChanged(old_contents, new_contents, index, reason); 982 window_->OnActiveTabChanged(old_contents, new_contents, index, reason);
983 983
984 fullscreen_controller_->OnTabDetachedFromView(old_contents);
985
984 // Discarded tabs always get reloaded. 986 // Discarded tabs always get reloaded.
985 if (tab_strip_model_->IsTabDiscarded(index)) { 987 if (tab_strip_model_->IsTabDiscarded(index)) {
986 LOG(WARNING) << "Reloading discarded tab at " << index; 988 LOG(WARNING) << "Reloading discarded tab at " << index;
987 static int reload_count = 0; 989 static int reload_count = 0;
988 UMA_HISTOGRAM_CUSTOM_COUNTS( 990 UMA_HISTOGRAM_CUSTOM_COUNTS(
989 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50); 991 "Tabs.Discard.ReloadCount", ++reload_count, 1, 1000, 50);
990 chrome::Reload(this, CURRENT_TAB); 992 chrome::Reload(this, CURRENT_TAB);
991 } 993 }
992 994
993 // If we have any update pending, do it now. 995 // If we have any update pending, do it now.
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 if (contents && !allow_js_access) { 2302 if (contents && !allow_js_access) {
2301 contents->web_contents()->GetController().LoadURL( 2303 contents->web_contents()->GetController().LoadURL(
2302 target_url, 2304 target_url,
2303 content::Referrer(), 2305 content::Referrer(),
2304 content::PAGE_TRANSITION_LINK, 2306 content::PAGE_TRANSITION_LINK,
2305 std::string()); // No extra headers. 2307 std::string()); // No extra headers.
2306 } 2308 }
2307 2309
2308 return contents != NULL; 2310 return contents != NULL;
2309 } 2311 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/fullscreen/fullscreen_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698