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

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

Issue 2841833002: Renamed LoadCommittedDetails.is_in_page to is_same_document. (Closed)
Patch Set: I said "once and for all" Created 3 years, 8 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 void ChromeBubbleManager::DidToggleFullscreenModeForTab( 154 void ChromeBubbleManager::DidToggleFullscreenModeForTab(
155 bool entered_fullscreen, bool will_cause_resize) { 155 bool entered_fullscreen, bool will_cause_resize) {
156 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED); 156 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN_TOGGLED);
157 // Any bubble that didn't close should update its anchor position. 157 // Any bubble that didn't close should update its anchor position.
158 UpdateAllBubbleAnchors(); 158 UpdateAllBubbleAnchors();
159 } 159 }
160 160
161 void ChromeBubbleManager::NavigationEntryCommitted( 161 void ChromeBubbleManager::NavigationEntryCommitted(
162 const content::LoadCommittedDetails& load_details) { 162 const content::LoadCommittedDetails& load_details) {
163 if (!load_details.is_in_page) 163 if (!load_details.is_same_document)
164 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED); 164 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATED);
165 } 165 }
166 166
167 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown( 167 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleNeverShown(
168 BubbleReference bubble) { 168 BubbleReference bubble) {
169 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble)); 169 UMA_HISTOGRAM_SPARSE_SLOWLY("Bubbles.NeverShown", GetBubbleId(bubble));
170 } 170 }
171 171
172 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed( 172 void ChromeBubbleManager::ChromeBubbleMetrics::OnBubbleClosed(
173 BubbleReference bubble, BubbleCloseReason reason) { 173 BubbleReference bubble, BubbleCloseReason reason) {
174 // Log the amount of time the bubble was visible. 174 // Log the amount of time the bubble was visible.
175 base::TimeDelta visible_time = bubble->GetVisibleTime(); 175 base::TimeDelta visible_time = bubble->GetVisibleTime();
176 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time); 176 UMA_HISTOGRAM_LONG_TIMES("Bubbles.DisplayTime.All", visible_time);
177 177
178 LogBubbleCloseReason(bubble, reason); 178 LogBubbleCloseReason(bubble, reason);
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698