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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc

Issue 12226100: Fix crash in ExtensionUninstallDialogView. It needs to verify Shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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) 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/extensions/extension_uninstall_dialog.h" 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 23 matching lines...) Expand all
34 class ExtensionUninstallDialogDelegateView; 34 class ExtensionUninstallDialogDelegateView;
35 35
36 // Returns parent window for extension uninstall dialog. 36 // Returns parent window for extension uninstall dialog.
37 // For ash, use app list window if it is visible. 37 // For ash, use app list window if it is visible.
38 // For other platforms or when app list is not visible on ash, 38 // For other platforms or when app list is not visible on ash,
39 // use the given browser window. 39 // use the given browser window.
40 // Note this function could return NULL if ash app list is not visible and 40 // Note this function could return NULL if ash app list is not visible and
41 // there is no browser window. 41 // there is no browser window.
42 gfx::NativeWindow GetParent(Browser* browser) { 42 gfx::NativeWindow GetParent(Browser* browser) {
43 #if defined(USE_ASH) 43 #if defined(USE_ASH)
44 gfx::NativeWindow app_list = ash::Shell::GetInstance()->GetAppListWindow(); 44 if (ash::Shell::HasInstance()) {
45 if (app_list) 45 gfx::NativeWindow app_list = ash::Shell::GetInstance()->GetAppListWindow();
46 return app_list; 46 if (app_list)
47 return app_list;
48 }
47 #endif 49 #endif
48 50
49 if (browser && browser->window()) 51 if (browser && browser->window())
50 return browser->window()->GetNativeWindow(); 52 return browser->window()->GetNativeWindow();
51 53
52 return NULL; 54 return NULL;
53 } 55 }
54 56
55 // Views implementation of the uninstall dialog. 57 // Views implementation of the uninstall dialog.
56 class ExtensionUninstallDialogViews : public ExtensionUninstallDialog { 58 class ExtensionUninstallDialogViews : public ExtensionUninstallDialog {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 243
242 } // namespace 244 } // namespace
243 245
244 // static 246 // static
245 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( 247 ExtensionUninstallDialog* ExtensionUninstallDialog::Create(
246 Profile* profile, 248 Profile* profile,
247 Browser* browser, 249 Browser* browser,
248 Delegate* delegate) { 250 Delegate* delegate) {
249 return new ExtensionUninstallDialogViews(profile, browser, delegate); 251 return new ExtensionUninstallDialogViews(profile, browser, delegate);
250 } 252 }
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