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

Side by Side Diff: chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc

Issue 2449243002: Gtk3 ui: Add libgtk3ui as a separate build component (Closed)
Patch Set: Add theme_properties dep to //chrome/browser/ui Created 4 years, 1 month 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 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/libgtk2ui/app_indicator_icon_menu.h" 5 #include "chrome/browser/ui/libgtkui/app_indicator_icon_menu.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
11 #include "chrome/browser/ui/libgtk2ui/menu_util.h" 11 #include "chrome/browser/ui/libgtkui/menu_util.h"
12 #include "ui/base/models/menu_model.h" 12 #include "ui/base/models/menu_model.h"
13 13
14 namespace libgtk2ui { 14 namespace libgtkui {
15 15
16 AppIndicatorIconMenu::AppIndicatorIconMenu(ui::MenuModel* model) 16 AppIndicatorIconMenu::AppIndicatorIconMenu(ui::MenuModel* model)
17 : menu_model_(model), 17 : menu_model_(model),
18 click_action_replacement_menu_item_added_(false), 18 click_action_replacement_menu_item_added_(false),
19 gtk_menu_(NULL), 19 gtk_menu_(NULL),
20 block_activation_(false) { 20 block_activation_(false) {
21 { 21 {
22 ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/378770 22 ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/378770
23 gtk_menu_ = gtk_menu_new(); 23 gtk_menu_ = gtk_menu_new();
24 } 24 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 int id; 114 int id;
115 if (!GetMenuItemID(menu_item, &id)) 115 if (!GetMenuItemID(menu_item, &id))
116 return; 116 return;
117 117
118 // The menu item can still be activated by hotkeys even if it is disabled. 118 // The menu item can still be activated by hotkeys even if it is disabled.
119 if (menu_model_->IsEnabledAt(id)) 119 if (menu_model_->IsEnabledAt(id))
120 ExecuteCommand(model, id); 120 ExecuteCommand(model, id);
121 } 121 }
122 122
123 } // namespace libgtk2ui 123 } // namespace libgtkui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/app_indicator_icon_menu.h ('k') | chrome/browser/ui/libgtkui/chrome_gtk_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698