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/gtk/extension_infobar_gtk.h" | 5 #include "chrome/browser/ui/gtk/extension_infobar_gtk.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
9 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/common/extensions/extension_icon_set.h" | 11 #include "chrome/common/extensions/extension_icon_set.h" |
12 #include "chrome/common/extensions/extension_resource.h" | 12 #include "chrome/common/extensions/extension_resource.h" |
13 #include "gfx/gtk_util.h" | |
14 #include "grit/theme_resources.h" | 13 #include "grit/theme_resources.h" |
15 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 15 #include "ui/gfx/gtk_util.h" |
16 | 16 |
17 ExtensionInfoBarGtk::ExtensionInfoBarGtk(ExtensionInfoBarDelegate* delegate) | 17 ExtensionInfoBarGtk::ExtensionInfoBarGtk(ExtensionInfoBarDelegate* delegate) |
18 : InfoBar(delegate), | 18 : InfoBar(delegate), |
19 tracker_(this), | 19 tracker_(this), |
20 delegate_(delegate), | 20 delegate_(delegate), |
21 view_(NULL) { | 21 view_(NULL) { |
22 delegate_->extension_host()->view()->SetContainer(this); | 22 delegate_->extension_host()->view()->SetContainer(this); |
23 BuildWidgets(); | 23 BuildWidgets(); |
24 } | 24 } |
25 | 25 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void ExtensionInfoBarGtk::OnExtensionPreferredSizeChanged( | 85 void ExtensionInfoBarGtk::OnExtensionPreferredSizeChanged( |
86 ExtensionViewGtk* view, | 86 ExtensionViewGtk* view, |
87 const gfx::Size& new_size) { | 87 const gfx::Size& new_size) { |
88 // TODO(rafaelw) - Size the InfobarGtk vertically based on the preferred size | 88 // TODO(rafaelw) - Size the InfobarGtk vertically based on the preferred size |
89 // of the content. | 89 // of the content. |
90 } | 90 } |
91 | 91 |
92 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar() { | 92 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar() { |
93 return new ExtensionInfoBarGtk(this); | 93 return new ExtensionInfoBarGtk(this); |
94 } | 94 } |
OLD | NEW |