Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc

Issue 9968076: Remove Inspect Popup command from browser actions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Woopsies Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/platform_util.h" 10 #include "chrome/browser/platform_util.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 ui::MenuModel* ExtensionInfoBarGtk::BuildMenuModel() { 156 ui::MenuModel* ExtensionInfoBarGtk::BuildMenuModel() {
157 const Extension* extension = delegate_->extension(); 157 const Extension* extension = delegate_->extension();
158 if (!extension->ShowConfigureContextMenus()) 158 if (!extension->ShowConfigureContextMenus())
159 return NULL; 159 return NULL;
160 160
161 Browser* browser = GetBrowser(); 161 Browser* browser = GetBrowser();
162 if (!browser) 162 if (!browser)
163 return NULL; 163 return NULL;
164 164
165 return new ExtensionContextMenuModel(extension, browser, NULL); 165 return new ExtensionContextMenuModel(extension, browser);
166 } 166 }
167 167
168 void ExtensionInfoBarGtk::OnSizeAllocate(GtkWidget* widget, 168 void ExtensionInfoBarGtk::OnSizeAllocate(GtkWidget* widget,
169 GtkAllocation* allocation) { 169 GtkAllocation* allocation) {
170 gfx::Size new_size(allocation->width, allocation->height); 170 gfx::Size new_size(allocation->width, allocation->height);
171 171
172 delegate_->extension_host()->view()->render_view_host()->GetView() 172 delegate_->extension_host()->view()->render_view_host()->GetView()
173 ->SetSize(new_size); 173 ->SetSize(new_size);
174 } 174 }
175 175
(...skipping 20 matching lines...) Expand all
196 // We also need to draw our infobar arrows over the renderer. 196 // We also need to draw our infobar arrows over the renderer.
197 static_cast<InfoBarContainerGtk*>(container())-> 197 static_cast<InfoBarContainerGtk*>(container())->
198 PaintInfobarBitsOn(sender, event, this); 198 PaintInfobarBitsOn(sender, event, this);
199 199
200 return FALSE; 200 return FALSE;
201 } 201 }
202 202
203 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 203 InfoBar* ExtensionInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) {
204 return new ExtensionInfoBarGtk(owner, this); 204 return new ExtensionInfoBarGtk(owner, this);
205 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698