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

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

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 9 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
14 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/compositor/compositor.h" 17 #include "ui/compositor/compositor.h"
17 #include "ui/compositor/layer.h" 18 #include "ui/compositor/layer.h"
18 #include "ui/views/controls/image_view.h" 19 #include "ui/views/controls/image_view.h"
19 #include "ui/views/controls/label.h" 20 #include "ui/views/controls/label.h"
20 #include "ui/views/layout/layout_constants.h" 21 #include "ui/views/layout/layout_constants.h"
21 #include "ui/views/view.h" 22 #include "ui/views/view.h"
(...skipping 17 matching lines...) Expand all
39 // use browser window of given |profile|. 40 // use browser window of given |profile|.
40 // Note this function could return NULL if ash app list is not visible and 41 // Note this function could return NULL if ash app list is not visible and
41 // there is no browser window open for |profile|. 42 // there is no browser window open for |profile|.
42 gfx::NativeWindow GetParent(Profile* profile) { 43 gfx::NativeWindow GetParent(Profile* profile) {
43 #if defined(USE_ASH) 44 #if defined(USE_ASH)
44 gfx::NativeWindow app_list = ash::Shell::GetInstance()->GetAppListWindow(); 45 gfx::NativeWindow app_list = ash::Shell::GetInstance()->GetAppListWindow();
45 if (app_list) 46 if (app_list)
46 return app_list; 47 return app_list;
47 #endif 48 #endif
48 49
49 Browser* browser = BrowserList::GetLastActiveWithProfile(profile); 50 Browser* browser = browser::FindLastActiveWithProfile(profile);
50 if (browser && browser->window()) 51 if (browser && browser->window())
51 return browser->window()->GetNativeHandle(); 52 return browser->window()->GetNativeHandle();
52 53
53 return NULL; 54 return NULL;
54 } 55 }
55 56
56 // Views implementation of the uninstall dialog. 57 // Views implementation of the uninstall dialog.
57 class ExtensionUninstallDialogViews : public ExtensionUninstallDialog { 58 class ExtensionUninstallDialogViews : public ExtensionUninstallDialog {
58 public: 59 public:
59 ExtensionUninstallDialogViews(Profile* profile, 60 ExtensionUninstallDialogViews(Profile* profile,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 239 }
239 } 240 }
240 241
241 } // namespace 242 } // namespace
242 243
243 // static 244 // static
244 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( 245 ExtensionUninstallDialog* ExtensionUninstallDialog::Create(
245 Profile* profile, Delegate* delegate) { 246 Profile* profile, Delegate* delegate) {
246 return new ExtensionUninstallDialogViews(profile, delegate); 247 return new ExtensionUninstallDialogViews(profile, delegate);
247 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698