| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser.h" | 5 #include "chrome/browser/browser.h" | 
| 6 | 6 | 
| 7 #include "app/animation.h" | 7 #include "app/animation.h" | 
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/keyboard_codes.h" | 10 #include "base/keyboard_codes.h" | 
| (...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2214       // actually be for a different window while we're doing asynchronous | 2214       // actually be for a different window while we're doing asynchronous | 
| 2215       // closing of this one. | 2215       // closing of this one. | 
| 2216       if (GetSelectedTabContents() && | 2216       if (GetSelectedTabContents() && | 
| 2217           &GetSelectedTabContents()->controller() == | 2217           &GetSelectedTabContents()->controller() == | 
| 2218           Source<NavigationController>(source).ptr()) | 2218           Source<NavigationController>(source).ptr()) | 
| 2219         UpdateToolbar(false); | 2219         UpdateToolbar(false); | 
| 2220       break; | 2220       break; | 
| 2221 | 2221 | 
| 2222     case NotificationType::EXTENSION_UPDATE_DISABLED: { | 2222     case NotificationType::EXTENSION_UPDATE_DISABLED: { | 
| 2223       // Show the UI. | 2223       // Show the UI. | 
| 2224       ExtensionsService* service = Source<ExtensionsService>(source).ptr(); | 2224       Profile* profile = Source<Profile>(source).ptr(); | 
|  | 2225       DCHECK_EQ(profile_, profile); | 
|  | 2226       ExtensionsService* service = profile->GetExtensionsService(); | 
|  | 2227       DCHECK(service); | 
| 2225       Extension* extension = Details<Extension>(details).ptr(); | 2228       Extension* extension = Details<Extension>(details).ptr(); | 
| 2226       ShowExtensionDisabledUI(service, profile_, extension); | 2229       ShowExtensionDisabledUI(service, profile_, extension); | 
| 2227       break; | 2230       break; | 
| 2228     } | 2231     } | 
| 2229 | 2232 | 
| 2230     case NotificationType::EXTENSION_UNLOADED: { | 2233     case NotificationType::EXTENSION_UNLOADED: { | 
| 2231       window()->GetLocationBar()->InvalidatePageActions(); | 2234       window()->GetLocationBar()->InvalidatePageActions(); | 
| 2232 | 2235 | 
| 2233       // Close any tabs from the unloaded extension. | 2236       // Close any tabs from the unloaded extension. | 
| 2234       Extension* extension = Details<Extension>(details).ptr(); | 2237       Extension* extension = Details<Extension>(details).ptr(); | 
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2981 /////////////////////////////////////////////////////////////////////////////// | 2984 /////////////////////////////////////////////////////////////////////////////// | 
| 2982 // BrowserToolbarModel (private): | 2985 // BrowserToolbarModel (private): | 
| 2983 | 2986 | 
| 2984 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2987 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 
| 2985   // This |current_tab| can be NULL during the initialization of the | 2988   // This |current_tab| can be NULL during the initialization of the | 
| 2986   // toolbar during window creation (i.e. before any tabs have been added | 2989   // toolbar during window creation (i.e. before any tabs have been added | 
| 2987   // to the window). | 2990   // to the window). | 
| 2988   TabContents* current_tab = browser_->GetSelectedTabContents(); | 2991   TabContents* current_tab = browser_->GetSelectedTabContents(); | 
| 2989   return current_tab ? ¤t_tab->controller() : NULL; | 2992   return current_tab ? ¤t_tab->controller() : NULL; | 
| 2990 } | 2993 } | 
| OLD | NEW | 
|---|