OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/frame/global_menu_bar_x11.h" | 5 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <glib-object.h> | 8 #include <glib-object.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/ui/browser_list.h" | 27 #include "chrome/browser/ui/browser_list.h" |
28 #include "chrome/browser/ui/browser_live_tab_context.h" | 28 #include "chrome/browser/ui/browser_live_tab_context.h" |
29 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h" | 29 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h" |
30 #include "chrome/browser/ui/views/frame/browser_view.h" | 30 #include "chrome/browser/ui/views/frame/browser_view.h" |
31 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" | 31 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" |
32 #include "chrome/grit/generated_resources.h" | 32 #include "chrome/grit/generated_resources.h" |
33 #include "components/bookmarks/common/bookmark_pref_names.h" | 33 #include "components/bookmarks/common/bookmark_pref_names.h" |
34 #include "components/history/core/browser/top_sites.h" | 34 #include "components/history/core/browser/top_sites.h" |
35 #include "components/prefs/pref_service.h" | 35 #include "components/prefs/pref_service.h" |
36 #include "components/sessions/core/tab_restore_service.h" | 36 #include "components/sessions/core/tab_restore_service.h" |
37 #include "grit/components_strings.h" | 37 #include "components/strings/grit/components_strings.h" |
38 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" | 38 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" |
39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
40 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 40 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
41 #include "ui/gfx/text_elider.h" | 41 #include "ui/gfx/text_elider.h" |
42 | 42 |
43 // libdbusmenu-glib types | 43 // libdbusmenu-glib types |
44 typedef struct _DbusmenuMenuitem DbusmenuMenuitem; | 44 typedef struct _DbusmenuMenuitem DbusmenuMenuitem; |
45 typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_func)(); | 45 typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_func)(); |
46 typedef bool (*dbusmenu_menuitem_child_add_position_func)( | 46 typedef bool (*dbusmenu_menuitem_child_add_position_func)( |
47 DbusmenuMenuitem* parent, | 47 DbusmenuMenuitem* parent, |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 unsigned int timestamp) { | 887 unsigned int timestamp) { |
888 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId)); | 888 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId)); |
889 avatar_menu_->EditProfile(id); | 889 avatar_menu_->EditProfile(id); |
890 } | 890 } |
891 | 891 |
892 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender, | 892 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender, |
893 unsigned int timestamp) { | 893 unsigned int timestamp) { |
894 profiles::CreateAndSwitchToNewProfile(ProfileManager::CreateCallback(), | 894 profiles::CreateAndSwitchToNewProfile(ProfileManager::CreateCallback(), |
895 ProfileMetrics::ADD_NEW_USER_MENU); | 895 ProfileMetrics::ADD_NEW_USER_MENU); |
896 } | 896 } |
OLD | NEW |