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

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

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accidentally made will_cause_resize always false in previous cleanup. Fixed 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chrome_bubble_manager.h" 5 #include "chrome/browser/ui/chrome_bubble_manager.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "components/bubble/bubble_controller.h" 10 #include "components/bubble/bubble_controller.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 void ChromeBubbleManager::ActiveTabChanged(content::WebContents* old_contents, 135 void ChromeBubbleManager::ActiveTabChanged(content::WebContents* old_contents,
136 content::WebContents* new_contents, 136 content::WebContents* new_contents,
137 int index, 137 int index,
138 int reason) { 138 int reason) {
139 Observe(new_contents); 139 Observe(new_contents);
140 } 140 }
141 141
142 void ChromeBubbleManager::DidToggleFullscreenModeForTab( 142 void ChromeBubbleManager::DidToggleFullscreenModeForTab(
143 bool entered_fullscreen) { 143 bool entered_fullscreen, bool will_cause_resize) {
144 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED); 144 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED);
145 // Any bubble that didn't close should update its anchor position. 145 // Any bubble that didn't close should update its anchor position.
146 UpdateAllBubbleAnchors(); 146 UpdateAllBubbleAnchors();
147 } 147 }
148 148
149 void ChromeBubbleManager::NavigationEntryCommitted( 149 void ChromeBubbleManager::NavigationEntryCommitted(
150 const content::LoadCommittedDetails& load_details) { 150 const content::LoadCommittedDetails& load_details) {
151 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED); 151 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED);
152 } 152 }
153 153
154 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown( 154 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown(
155 BubbleReference bubble) { 155 BubbleReference bubble) {
156 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble)); 156 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble));
157 } 157 }
158 158
159 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed( 159 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed(
160 BubbleReference bubble, BubbleCloseReason reason) { 160 BubbleReference bubble, BubbleCloseReason reason) {
161 // Log the amount of time the bubble was visible. 161 // Log the amount of time the bubble was visible.
162 base::TimeDelta visible_time = bubble->GetVisibleTime(); 162 base::TimeDelta visible_time = bubble->GetVisibleTime();
163 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time); 163 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time);
164 164
165 LogBubbleCloseReason(bubble, reason); 165 LogBubbleCloseReason(bubble, reason);
166 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.h ('k') | chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698