| OLD | NEW |
| 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/views/infobars/extension_infobar.h" | 5 #include "chrome/browser/ui/views/infobars/extension_infobar.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_context_menu_model.h" | 7 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 8 #include "chrome/browser/extensions/extension_infobar_delegate.h" | 8 #include "chrome/browser/extensions/extension_infobar_delegate.h" |
| 9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
| 10 #include "chrome/browser/platform_util.h" | 10 #include "chrome/browser/platform_util.h" |
| 11 #include "chrome/browser/ui/views/frame/browser_view.h" | 11 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 13 #include "chrome/common/extensions/extension_icon_set.h" | 13 #include "chrome/common/extensions/extension_icon_set.h" |
| 14 #include "chrome/common/extensions/extension_resource.h" | 14 #include "chrome/common/extensions/extension_resource.h" |
| 15 #include "gfx/canvas_skia.h" | |
| 16 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
| 17 #include "ui/base/animation/slide_animation.h" | 16 #include "ui/base/animation/slide_animation.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 18 #include "ui/gfx/canvas_skia.h" |
| 19 #include "views/controls/button/menu_button.h" | 19 #include "views/controls/button/menu_button.h" |
| 20 #include "views/controls/menu/menu_2.h" | 20 #include "views/controls/menu/menu_2.h" |
| 21 #include "views/widget/widget.h" | 21 #include "views/widget/widget.h" |
| 22 | 22 |
| 23 // The horizontal margin between the menu and the Extension (HTML) view. | 23 // The horizontal margin between the menu and the Extension (HTML) view. |
| 24 static const int kMenuHorizontalMargin = 1; | 24 static const int kMenuHorizontalMargin = 1; |
| 25 | 25 |
| 26 // The amount of space to the right of the Extension (HTML) view (to avoid | 26 // The amount of space to the right of the Extension (HTML) view (to avoid |
| 27 // overlapping the close button for the InfoBar). | 27 // overlapping the close button for the InfoBar). |
| 28 static const int kFarRightMargin = 30; | 28 static const int kFarRightMargin = 30; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 Extension::EXTENSION_ICON_BITTY), | 178 Extension::EXTENSION_ICON_BITTY), |
| 179 ImageLoadingTracker::DONT_CACHE); | 179 ImageLoadingTracker::DONT_CACHE); |
| 180 } else { | 180 } else { |
| 181 OnImageLoaded(NULL, icon_resource, 0); // |image|, |index|. | 181 OnImageLoaded(NULL, icon_resource, 0); // |image|, |index|. |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar() { | 185 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar() { |
| 186 return new ExtensionInfoBar(this); | 186 return new ExtensionInfoBar(this); |
| 187 } | 187 } |
| OLD | NEW |