| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
| 6 | 6 |
| 7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 int index, | 716 int index, |
| 717 bool foreground) { | 717 bool foreground) { |
| 718 AddInterstitialObservers(contents); | 718 AddInterstitialObservers(contents); |
| 719 } | 719 } |
| 720 | 720 |
| 721 void BrowserCommandController::TabDetachedAt(WebContents* contents, int index) { | 721 void BrowserCommandController::TabDetachedAt(WebContents* contents, int index) { |
| 722 RemoveInterstitialObservers(contents); | 722 RemoveInterstitialObservers(contents); |
| 723 } | 723 } |
| 724 | 724 |
| 725 void BrowserCommandController::TabReplacedAt(TabStripModel* tab_strip_model, | 725 void BrowserCommandController::TabReplacedAt(TabStripModel* tab_strip_model, |
| 726 TabContents* old_contents, | 726 WebContents* old_contents, |
| 727 TabContents* new_contents, | 727 WebContents* new_contents, |
| 728 int index) { | 728 int index) { |
| 729 RemoveInterstitialObservers(old_contents->web_contents()); | 729 RemoveInterstitialObservers(old_contents); |
| 730 AddInterstitialObservers(new_contents->web_contents()); | 730 AddInterstitialObservers(new_contents); |
| 731 } | 731 } |
| 732 | 732 |
| 733 //////////////////////////////////////////////////////////////////////////////// | 733 //////////////////////////////////////////////////////////////////////////////// |
| 734 // BrowserCommandController, TabRestoreServiceObserver implementation: | 734 // BrowserCommandController, TabRestoreServiceObserver implementation: |
| 735 | 735 |
| 736 void BrowserCommandController::TabRestoreServiceChanged( | 736 void BrowserCommandController::TabRestoreServiceChanged( |
| 737 TabRestoreService* service) { | 737 TabRestoreService* service) { |
| 738 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, | 738 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, |
| 739 CanRestoreTab(browser_)); | 739 CanRestoreTab(browser_)); |
| 740 } | 740 } |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 | 1184 |
| 1185 BrowserWindow* BrowserCommandController::window() { | 1185 BrowserWindow* BrowserCommandController::window() { |
| 1186 return browser_->window(); | 1186 return browser_->window(); |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 Profile* BrowserCommandController::profile() { | 1189 Profile* BrowserCommandController::profile() { |
| 1190 return browser_->profile(); | 1190 return browser_->profile(); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 } // namespace chrome | 1193 } // namespace chrome |
| OLD | NEW |