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/gtk/infobars/extension_infobar_gtk.h" | 5 #include "chrome/browser/ui/gtk/infobars/extension_infobar_gtk.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "chrome/browser/extensions/extension_context_menu_model.h" | 8 #include "chrome/browser/extensions/extension_context_menu_model.h" |
9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
| 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
10 #include "chrome/browser/platform_util.h" | 11 #include "chrome/browser/platform_util.h" |
11 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 12 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
12 #include "chrome/browser/ui/gtk/custom_button.h" | 13 #include "chrome/browser/ui/gtk/custom_button.h" |
13 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" | 14 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" |
14 #include "chrome/browser/ui/gtk/gtk_util.h" | 15 #include "chrome/browser/ui/gtk/gtk_util.h" |
15 #include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h" | 16 #include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h" |
16 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
17 #include "chrome/common/extensions/extension_icon_set.h" | 18 #include "chrome/common/extensions/extension_icon_set.h" |
18 #include "chrome/common/extensions/extension_resource.h" | 19 #include "chrome/common/extensions/extension_resource.h" |
19 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 GdkEventExpose* event) { | 195 GdkEventExpose* event) { |
195 TRACE_EVENT0("ui::gtk", "ExtensionInfoBarGtk::OnExpose"); | 196 TRACE_EVENT0("ui::gtk", "ExtensionInfoBarGtk::OnExpose"); |
196 | 197 |
197 // We also need to draw our infobar arrows over the renderer. | 198 // We also need to draw our infobar arrows over the renderer. |
198 static_cast<InfoBarContainerGtk*>(container())-> | 199 static_cast<InfoBarContainerGtk*>(container())-> |
199 PaintInfobarBitsOn(sender, event, this); | 200 PaintInfobarBitsOn(sender, event, this); |
200 | 201 |
201 return FALSE; | 202 return FALSE; |
202 } | 203 } |
203 | 204 |
204 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { | 205 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabService* owner) { |
205 return new ExtensionInfoBarGtk(owner, this); | 206 return new ExtensionInfoBarGtk(static_cast<InfoBarTabHelper*>(owner), this); |
206 } | 207 } |
OLD | NEW |