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

Side by Side Diff: chrome/browser/browser.cc

Issue 385076: Correctly get ExtensionService out of EXTENSION_PROCESS_CRASHED notification.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 break; 2269 break;
2270 } 2270 }
2271 2271
2272 case NotificationType::EXTENSION_PROCESS_CRASHED: { 2272 case NotificationType::EXTENSION_PROCESS_CRASHED: {
2273 window()->GetLocationBar()->InvalidatePageActions(); 2273 window()->GetLocationBar()->InvalidatePageActions();
2274 2274
2275 TabContents* tab_contents = GetSelectedTabContents(); 2275 TabContents* tab_contents = GetSelectedTabContents();
2276 if (!tab_contents) 2276 if (!tab_contents)
2277 break; 2277 break;
2278 ExtensionsService* extensions_service = 2278 ExtensionsService* extensions_service =
2279 Source<ExtensionsService>(source).ptr(); 2279 Source<Profile>(source).ptr()->GetExtensionsService();
2280 ExtensionHost* extension_host = Details<ExtensionHost>(details).ptr(); 2280 ExtensionHost* extension_host = Details<ExtensionHost>(details).ptr();
2281 tab_contents->AddInfoBar(new CrashedExtensionInfoBarDelegate( 2281 tab_contents->AddInfoBar(new CrashedExtensionInfoBarDelegate(
2282 tab_contents, extensions_service, extension_host->extension())); 2282 tab_contents, extensions_service, extension_host->extension()));
2283 break; 2283 break;
2284 } 2284 }
2285 2285
2286 case NotificationType::BROWSER_THEME_CHANGED: 2286 case NotificationType::BROWSER_THEME_CHANGED:
2287 window()->UserChangedTheme(); 2287 window()->UserChangedTheme();
2288 break; 2288 break;
2289 2289
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 /////////////////////////////////////////////////////////////////////////////// 3023 ///////////////////////////////////////////////////////////////////////////////
3024 // BrowserToolbarModel (private): 3024 // BrowserToolbarModel (private):
3025 3025
3026 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 3026 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
3027 // This |current_tab| can be NULL during the initialization of the 3027 // This |current_tab| can be NULL during the initialization of the
3028 // toolbar during window creation (i.e. before any tabs have been added 3028 // toolbar during window creation (i.e. before any tabs have been added
3029 // to the window). 3029 // to the window).
3030 TabContents* current_tab = browser_->GetSelectedTabContents(); 3030 TabContents* current_tab = browser_->GetSelectedTabContents();
3031 return current_tab ? &current_tab->controller() : NULL; 3031 return current_tab ? &current_tab->controller() : NULL;
3032 } 3032 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698