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 | 9 |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/app/chrome_command_ids.h" | 17 #include "chrome/app/chrome_command_ids.h" |
18 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
19 #include "chrome/browser/history/top_sites.h" | 19 #include "chrome/browser/history/top_sites.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/sessions/tab_restore_service.h" | 21 #include "chrome/browser/sessions/tab_restore_service.h" |
22 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 22 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
23 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
24 #include "chrome/browser/ui/browser_commands.h" | 24 #include "chrome/browser/ui/browser_commands.h" |
25 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 25 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
26 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h" | 26 #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.h" |
27 #include "chrome/browser/ui/views/frame/browser_view.h" | 27 #include "chrome/browser/ui/views/frame/browser_view.h" |
28 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" | 28 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "components/bookmarks/bookmark_pref_names.h" |
30 #include "content/public/browser/notification_source.h" | 31 #include "content/public/browser/notification_source.h" |
31 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
32 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" | 33 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" |
33 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 35 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
35 #include "ui/gfx/text_elider.h" | 36 #include "ui/gfx/text_elider.h" |
36 | 37 |
37 // libdbusmenu-glib types | 38 // libdbusmenu-glib types |
38 typedef struct _DbusmenuMenuitem DbusmenuMenuitem; | 39 typedef struct _DbusmenuMenuitem DbusmenuMenuitem; |
39 typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_func)(); | 40 typedef DbusmenuMenuitem* (*dbusmenu_menuitem_new_func)(); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 tab_restore_service_->LoadTabsFromLastSession(); | 782 tab_restore_service_->LoadTabsFromLastSession(); |
782 tab_restore_service_->AddObserver(this); | 783 tab_restore_service_->AddObserver(this); |
783 | 784 |
784 // If LoadTabsFromLastSession doesn't load tabs, it won't call | 785 // If LoadTabsFromLastSession doesn't load tabs, it won't call |
785 // TabRestoreServiceChanged(). This ensures that all new windows after | 786 // TabRestoreServiceChanged(). This ensures that all new windows after |
786 // the first one will have their menus populated correctly. | 787 // the first one will have their menus populated correctly. |
787 TabRestoreServiceChanged(tab_restore_service_); | 788 TabRestoreServiceChanged(tab_restore_service_); |
788 } | 789 } |
789 } | 790 } |
790 } | 791 } |
OLD | NEW |