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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Changes to test trybots Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index befe5b85037b929614fa0d59510a954408011b3d..c20cfc09445e550630d3c5d29f79482dc2df3f45 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -809,6 +809,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
+
+ bubble_manager_.FullscreenToggle();
msw 2015/08/18 17:26:18 nit: name this WindowFullscreenStateChanged for co
msw 2015/08/18 17:26:18 It'd be nice if this didn't have to be hooked dire
hcarmona 2015/08/18 23:08:47 Acknowledged.
hcarmona 2015/08/18 23:08:47 Done.
}
///////////////////////////////////////////////////////////////////////////////
@@ -990,6 +992,8 @@ void Browser::TabDetachedAt(WebContents* contents, int index) {
}
TabDetachedAtImpl(contents, index, DETACH_TYPE_DETACH);
+
+ bubble_manager_.TabDetached();
msw 2015/08/18 17:26:18 Instead of adding logic here, can the ChromeBubble
hcarmona 2015/08/18 23:08:47 Making it into a TabStipModelObserver seems like o
msw 2015/08/19 00:18:11 I don't think it's overkill, especially when it re
groby-ooo-7-16 2015/08/19 00:52:01 +1 on that. browser.cc is currently some catch-all
}
void Browser::TabDeactivated(WebContents* contents) {
@@ -1003,6 +1007,8 @@ void Browser::TabDeactivated(WebContents* contents) {
if (instant_controller_)
instant_controller_->TabDeactivated(contents);
+
+ bubble_manager_.TabBlur();
msw 2015/08/18 17:26:18 Ditto, make ChromeBubbleManager a TabStripModelObs
hcarmona 2015/08/18 23:08:47 Acknowledged.
}
void Browser::ActiveTabChanged(WebContents* old_contents,
@@ -1087,6 +1093,8 @@ void Browser::ActiveTabChanged(WebContents* old_contents,
autofill::ChromeAutofillClient::FromWebContents(new_contents)->TabActivated();
SearchTabHelper::FromWebContents(new_contents)->OnTabActivated();
+
+ bubble_manager_.TabFocus();
msw 2015/08/18 17:26:18 Ditto, make ChromeBubbleManager a TabStripModelObs
hcarmona 2015/08/18 23:08:47 This function's not needed.
}
void Browser::TabMoved(WebContents* contents,

Powered by Google App Engine
This is Rietveld 408576698