| Index: chrome/browser/ui/ash/launcher/browser_status_monitor.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
|
| index 5636e7032347ae04a9d9e5cc2145ab0d915039b9..e2218746f236221b22852f8f1063806fb5509426 100644
|
| --- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
|
| +++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/shell.h"
|
| #include "ash/wm/window_util.h"
|
| +#include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
|
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| @@ -71,6 +72,7 @@ void BrowserStatusMonitor::OnWindowActivated(aura::Window* gained_active,
|
| active_contents = browser->tab_strip_model()->GetActiveWebContents();
|
| if (active_contents)
|
| UpdateAppState(active_contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| browser = chrome::FindBrowserWithWindow(gained_active);
|
| @@ -78,6 +80,7 @@ void BrowserStatusMonitor::OnWindowActivated(aura::Window* gained_active,
|
| active_contents = browser->tab_strip_model()->GetActiveWebContents();
|
| if (active_contents)
|
| UpdateAppState(active_contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
| }
|
|
|
| @@ -108,7 +111,7 @@ void BrowserStatusMonitor::OnBrowserRemoved(Browser* browser) {
|
| launcher_controller_->UnlockV1AppWithID(browser_to_app_id_map_[browser]);
|
| browser_to_app_id_map_.erase(browser);
|
| }
|
| - launcher_controller_->UpdateBrowserItemStatus();
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::OnDisplayBoundsChanged(
|
| @@ -151,18 +154,21 @@ void BrowserStatusMonitor::ActiveTabChanged(content::WebContents* old_contents,
|
| UpdateAppState(old_contents);
|
|
|
| UpdateAppState(new_contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::TabInsertedAt(content::WebContents* contents,
|
| int index,
|
| bool foreground) {
|
| UpdateAppState(contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::TabDetachedAt(content::WebContents* contents,
|
| int index) {
|
| launcher_controller_->UpdateAppState(
|
| contents, ChromeLauncherController::APP_STATE_REMOVED);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::TabChangedAt(
|
| @@ -170,6 +176,7 @@ void BrowserStatusMonitor::TabChangedAt(
|
| int index,
|
| TabStripModelObserver::TabChangeType change_type) {
|
| UpdateAppState(contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::TabReplacedAt(TabStripModel* tab_strip_model,
|
| @@ -180,6 +187,7 @@ void BrowserStatusMonitor::TabReplacedAt(TabStripModel* tab_strip_model,
|
| old_contents,
|
| ChromeLauncherController::APP_STATE_REMOVED);
|
| UpdateAppState(new_contents);
|
| + UpdateBrowserItemStatus();
|
| }
|
|
|
| void BrowserStatusMonitor::UpdateAppState(content::WebContents* contents) {
|
| @@ -199,3 +207,8 @@ void BrowserStatusMonitor::UpdateAppState(content::WebContents* contents) {
|
|
|
| launcher_controller_->UpdateAppState(contents, app_state);
|
| }
|
| +
|
| +void BrowserStatusMonitor::UpdateBrowserItemStatus() {
|
| + launcher_controller_->GetBrowserShortcutLauncherItemController()->
|
| + UpdateBrowserItemStatus();
|
| +}
|
|
|