OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "chrome/browser/tab_contents/infobar_delegate.h" | 8 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
9 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" | 9 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_dialogs.h" | 11 #include "chrome/browser/ui/browser_dialogs.h" |
| 12 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" |
12 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
13 #include "chrome/common/extensions/extension_action.h" | 14 #include "chrome/common/extensions/extension_action.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 | 17 |
17 // When an extension is installed on Mac with neither browser action nor | 18 // When an extension is installed on Mac with neither browser action nor |
18 // page action icons, show an infobar instead of a popup bubble. | 19 // page action icons, show an infobar instead of a popup bubble. |
19 static void ShowGenericExtensionInstalledInfoBar( | 20 static void ShowGenericExtensionInstalledInfoBar( |
20 const Extension* new_extension, | 21 const Extension* new_extension, |
21 SkBitmap icon, | 22 SkBitmap icon, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 icon:icon]; | 60 icon:icon]; |
60 } else { | 61 } else { |
61 // If the extension is of type GENERIC, meaning it doesn't have a UI | 62 // If the extension is of type GENERIC, meaning it doesn't have a UI |
62 // surface to display for this window, launch infobar instead of popup | 63 // surface to display for this window, launch infobar instead of popup |
63 // bubble, because we have no guaranteed wrench menu button to point to. | 64 // bubble, because we have no guaranteed wrench menu button to point to. |
64 ShowGenericExtensionInstalledInfoBar(extension, icon, profile); | 65 ShowGenericExtensionInstalledInfoBar(extension, icon, profile); |
65 } | 66 } |
66 } | 67 } |
67 | 68 |
68 } // namespace browser | 69 } // namespace browser |
OLD | NEW |