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/extensions/extension_install_ui_default.h" | 5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "ui/base/l10n/l10n_util.h" | 38 #include "ui/base/l10n/l10n_util.h" |
39 | 39 |
40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
41 #include "chrome/browser/ui/extensions/extension_installed_notification.h" | 41 #include "chrome/browser/ui/extensions/extension_installed_notification.h" |
42 #else | 42 #else |
43 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" |
44 #include "content/public/browser/notification_service.h" | 44 #include "content/public/browser/notification_service.h" |
45 #endif | 45 #endif |
46 | 46 |
47 #if defined(USE_ASH) | 47 #if defined(USE_ASH) |
48 #include "ash/shell.h" | 48 #include "ash/shell.h" // nogncheck |
49 #endif | 49 #endif |
50 | 50 |
51 using content::BrowserThread; | 51 using content::BrowserThread; |
52 using content::WebContents; | 52 using content::WebContents; |
53 using extensions::Extension; | 53 using extensions::Extension; |
54 | 54 |
55 namespace { | 55 namespace { |
56 | 56 |
57 Browser* FindOrCreateVisibleBrowser(Profile* profile) { | 57 Browser* FindOrCreateVisibleBrowser(Profile* profile) { |
58 // TODO(mpcomplete): remove this workaround for http://crbug.com/244246 | 58 // TODO(mpcomplete): remove this workaround for http://crbug.com/244246 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { | 255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { |
256 Browser* browser = chrome::FindLastActiveWithProfile(profile_); | 256 Browser* browser = chrome::FindLastActiveWithProfile(profile_); |
257 if (browser) { | 257 if (browser) { |
258 content::WebContents* contents = | 258 content::WebContents* contents = |
259 browser->tab_strip_model()->GetActiveWebContents(); | 259 browser->tab_strip_model()->GetActiveWebContents(); |
260 return contents->GetTopLevelNativeWindow(); | 260 return contents->GetTopLevelNativeWindow(); |
261 } | 261 } |
262 return NULL; | 262 return NULL; |
263 } | 263 } |
OLD | NEW |