| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/libgtkui/gtk_status_icon.h" | 5 #include "chrome/browser/ui/libgtkui/gtk_status_icon.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/debug/leak_annotations.h" | 9 #include "base/debug/leak_annotations.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 void Gtk2StatusIcon::OnClick(GtkStatusIcon* status_icon) { | 69 void Gtk2StatusIcon::OnClick(GtkStatusIcon* status_icon) { |
| 70 if (delegate()) | 70 if (delegate()) |
| 71 delegate()->OnClick(); | 71 delegate()->OnClick(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void Gtk2StatusIcon::OnContextMenuRequested(GtkStatusIcon* status_icon, | 74 void Gtk2StatusIcon::OnContextMenuRequested(GtkStatusIcon* status_icon, |
| 75 guint button, | 75 guint button, |
| 76 guint32 activate_time) { | 76 guint32 activate_time) { |
| 77 if (menu_.get()) { | 77 if (menu_.get()) { |
| 78 gtk_menu_popup(menu_->GetGtkMenu(), NULL, NULL, | 78 gtk_menu_popup(menu_->GetGtkMenu(), nullptr, nullptr, |
| 79 gtk_status_icon_position_menu, gtk_status_icon_, button, | 79 gtk_status_icon_position_menu, gtk_status_icon_, button, |
| 80 activate_time); | 80 activate_time); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace libgtkui | 84 } // namespace libgtkui |
| OLD | NEW |