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

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

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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/extensions/image_loader.h" 10 #include "chrome/browser/extensions/image_loader.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 220
221 gboolean ExtensionInfoBarGtk::OnButtonPress(GtkWidget* widget, 221 gboolean ExtensionInfoBarGtk::OnButtonPress(GtkWidget* widget,
222 GdkEventButton* event) { 222 GdkEventButton* event) {
223 if (event->button != 1) 223 if (event->button != 1)
224 return FALSE; 224 return FALSE;
225 225
226 DCHECK(button_); 226 DCHECK(button_);
227 227
228 context_menu_model_ = BuildMenuModel(); 228 context_menu_model_ = BuildMenuModel();
229 if (!context_menu_model_) 229 if (!context_menu_model_.get())
230 return FALSE; 230 return FALSE;
231 231
232 gtk_chrome_button_set_paint_state(GTK_CHROME_BUTTON(widget), 232 gtk_chrome_button_set_paint_state(GTK_CHROME_BUTTON(widget),
233 GTK_STATE_ACTIVE); 233 GTK_STATE_ACTIVE);
234 ShowMenuWithModel(widget, this, context_menu_model_); 234 ShowMenuWithModel(widget, this, context_menu_model_.get());
235 235
236 return TRUE; 236 return TRUE;
237 } 237 }
238 238
239 gboolean ExtensionInfoBarGtk::OnExpose(GtkWidget* sender, 239 gboolean ExtensionInfoBarGtk::OnExpose(GtkWidget* sender,
240 GdkEventExpose* event) { 240 GdkEventExpose* event) {
241 TRACE_EVENT0("ui::gtk", "ExtensionInfoBarGtk::OnExpose"); 241 TRACE_EVENT0("ui::gtk", "ExtensionInfoBarGtk::OnExpose");
242 242
243 // We also need to draw our infobar arrows over the renderer. 243 // We also need to draw our infobar arrows over the renderer.
244 static_cast<InfoBarContainerGtk*>(container())-> 244 static_cast<InfoBarContainerGtk*>(container())->
245 PaintInfobarBitsOn(sender, event, this); 245 PaintInfobarBitsOn(sender, event, this);
246 246
247 return FALSE; 247 return FALSE;
248 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/ui/gtk/ssl_client_certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698