| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ash/launcher/browser_status_monitor.h" | 5 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
| 9 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" | 9 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" |
| 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 int index) { | 163 int index) { |
| 164 launcher_controller_->UpdateAppState( | 164 launcher_controller_->UpdateAppState( |
| 165 contents, ChromeLauncherController::APP_STATE_REMOVED); | 165 contents, ChromeLauncherController::APP_STATE_REMOVED); |
| 166 UpdateBrowserItemState(); | 166 UpdateBrowserItemState(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void BrowserStatusMonitor::TabChangedAt( | 169 void BrowserStatusMonitor::TabChangedAt( |
| 170 content::WebContents* contents, | 170 content::WebContents* contents, |
| 171 int index, | 171 int index, |
| 172 TabStripModelObserver::TabChangeType change_type) { | 172 TabStripModelObserver::TabChangeType change_type) { |
| 173 UpdateAppAndBrowserState(contents); | 173 if (change_type == TabStripModelObserver::URL_CHANGING_ONLY) |
| 174 UpdateAppAndBrowserState(contents); |
| 174 } | 175 } |
| 175 | 176 |
| 176 void BrowserStatusMonitor::TabReplacedAt(TabStripModel* tab_strip_model, | 177 void BrowserStatusMonitor::TabReplacedAt(TabStripModel* tab_strip_model, |
| 177 content::WebContents* old_contents, | 178 content::WebContents* old_contents, |
| 178 content::WebContents* new_contents, | 179 content::WebContents* new_contents, |
| 179 int index) { | 180 int index) { |
| 180 launcher_controller_->UpdateAppState( | 181 launcher_controller_->UpdateAppState( |
| 181 old_contents, | 182 old_contents, |
| 182 ChromeLauncherController::APP_STATE_REMOVED); | 183 ChromeLauncherController::APP_STATE_REMOVED); |
| 183 UpdateAppAndBrowserState(new_contents); | 184 UpdateAppAndBrowserState(new_contents); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 199 | 200 |
| 200 launcher_controller_->UpdateAppState(contents, app_state); | 201 launcher_controller_->UpdateAppState(contents, app_state); |
| 201 } | 202 } |
| 202 UpdateBrowserItemState(); | 203 UpdateBrowserItemState(); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void BrowserStatusMonitor::UpdateBrowserItemState() { | 206 void BrowserStatusMonitor::UpdateBrowserItemState() { |
| 206 launcher_controller_->GetBrowserShortcutLauncherItemController()-> | 207 launcher_controller_->GetBrowserShortcutLauncherItemController()-> |
| 207 UpdateBrowserItemState(); | 208 UpdateBrowserItemState(); |
| 208 } | 209 } |
| OLD | NEW |