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

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: Trying to fix test broken on Mac Created 5 years 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 void ChromeBubbleManager::ActiveTabChanged(content::WebContents* old_contents, 129 void ChromeBubbleManager::ActiveTabChanged(content::WebContents* old_contents,
130 content::WebContents* new_contents, 130 content::WebContents* new_contents,
131 int index, 131 int index,
132 int reason) { 132 int reason) {
133 Observe(new_contents); 133 Observe(new_contents);
134 } 134 }
135 135
136 void ChromeBubbleManager::DidToggleFullscreenModeForTab( 136 void ChromeBubbleManager::DidToggleFullscreenModeForTab(
137 bool entered_fullscreen) { 137 bool entered_fullscreen, bool will_cause_resize) {
138 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED); 138 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED);
139 // Any bubble that didn't close should update its anchor position. 139 // Any bubble that didn't close should update its anchor position.
140 UpdateAllBubbleAnchors(); 140 UpdateAllBubbleAnchors();
141 } 141 }
142 142
143 void ChromeBubbleManager::NavigationEntryCommitted( 143 void ChromeBubbleManager::NavigationEntryCommitted(
144 const content::LoadCommittedDetails& load_details) { 144 const content::LoadCommittedDetails& load_details) {
145 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED); 145 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED);
146 } 146 }
147 147
148 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown( 148 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown(
149 BubbleReference bubble) { 149 BubbleReference bubble) {
150 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble)); 150 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble));
151 } 151 }
152 152
153 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed( 153 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed(
154 BubbleReference bubble, BubbleCloseReason reason) { 154 BubbleReference bubble, BubbleCloseReason reason) {
155 // Log the amount of time the bubble was visible. 155 // Log the amount of time the bubble was visible.
156 base::TimeDelta visible_time = bubble->GetVisibleTime(); 156 base::TimeDelta visible_time = bubble->GetVisibleTime();
157 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time); 157 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time);
158 158
159 LogBubbleCloseReason(bubble, reason); 159 LogBubbleCloseReason(bubble, reason);
160 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698