OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_titlebar.h" | 5 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/ui/gtk/menu_gtk.h" | 34 #include "chrome/browser/ui/gtk/menu_gtk.h" |
35 #include "chrome/browser/ui/gtk/nine_box.h" | 35 #include "chrome/browser/ui/gtk/nine_box.h" |
36 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 36 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
37 #include "chrome/browser/ui/gtk/unity_service.h" | 37 #include "chrome/browser/ui/gtk/unity_service.h" |
38 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" | 38 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
39 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 39 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
40 #include "chrome/common/chrome_notification_types.h" | 40 #include "chrome/common/chrome_notification_types.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
43 #include "content/browser/tab_contents/tab_contents.h" | 43 #include "content/browser/tab_contents/tab_contents.h" |
44 #include "content/common/notification_service.h" | 44 #include "content/public/browser/notification_service.h" |
45 #include "grit/generated_resources.h" | 45 #include "grit/generated_resources.h" |
46 #include "grit/theme_resources.h" | 46 #include "grit/theme_resources.h" |
47 #include "grit/theme_resources_standard.h" | 47 #include "grit/theme_resources_standard.h" |
48 #include "grit/ui_resources.h" | 48 #include "grit/ui_resources.h" |
49 #include "ui/base/gtk/gtk_hig_constants.h" | 49 #include "ui/base/gtk/gtk_hig_constants.h" |
50 #include "ui/base/l10n/l10n_util.h" | 50 #include "ui/base/l10n/l10n_util.h" |
51 #include "ui/base/resource/resource_bundle.h" | 51 #include "ui/base/resource/resource_bundle.h" |
52 #include "ui/gfx/gtk_util.h" | 52 #include "ui/gfx/gtk_util.h" |
53 #include "ui/gfx/image/image.h" | 53 #include "ui/gfx/image/image.h" |
54 #include "ui/gfx/skbitmap_operations.h" | 54 #include "ui/gfx/skbitmap_operations.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 titlebar_right_buttons_vbox_ = gtk_vbox_new(FALSE, 0); | 330 titlebar_right_buttons_vbox_ = gtk_vbox_new(FALSE, 0); |
331 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_right_buttons_vbox_, | 331 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_right_buttons_vbox_, |
332 FALSE, FALSE, 0); | 332 FALSE, FALSE, 0); |
333 | 333 |
334 // Create the Avatar button and listen for notifications. It must always be | 334 // Create the Avatar button and listen for notifications. It must always be |
335 // created because a new profile can be added at any time. | 335 // created because a new profile can be added at any time. |
336 avatar_button_.reset(new AvatarMenuButtonGtk(browser_window_->browser())); | 336 avatar_button_.reset(new AvatarMenuButtonGtk(browser_window_->browser())); |
337 | 337 |
338 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, | 338 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, |
339 NotificationService::AllSources()); | 339 content::NotificationService::AllSources()); |
340 | 340 |
341 #if defined(USE_GCONF) | 341 #if defined(USE_GCONF) |
342 // Either read the gconf database and register for updates (on GNOME), or use | 342 // Either read the gconf database and register for updates (on GNOME), or use |
343 // the default value (anywhere else). | 343 // the default value (anywhere else). |
344 GConfTitlebarListener::GetInstance()->SetTitlebarButtons(this); | 344 GConfTitlebarListener::GetInstance()->SetTitlebarButtons(this); |
345 #else | 345 #else |
346 BuildButtons(kDefaultButtonString); | 346 BuildButtons(kDefaultButtonString); |
347 #endif | 347 #endif |
348 | 348 |
349 UpdateAvatar(); | 349 UpdateAvatar(); |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 ui::SimpleMenuModel::Delegate* delegate) | 1096 ui::SimpleMenuModel::Delegate* delegate) |
1097 : SimpleMenuModel(delegate) { | 1097 : SimpleMenuModel(delegate) { |
1098 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1098 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
1099 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1099 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
1100 AddSeparator(); | 1100 AddSeparator(); |
1101 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1101 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
1102 AddSeparator(); | 1102 AddSeparator(); |
1103 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1103 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
1104 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1104 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
1105 } | 1105 } |
OLD | NEW |