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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 titlebar_left_spy_frame_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); | 305 titlebar_left_spy_frame_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); |
306 gtk_widget_set_no_show_all(titlebar_left_spy_frame_, TRUE); | 306 gtk_widget_set_no_show_all(titlebar_left_spy_frame_, TRUE); |
307 gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_left_spy_frame_), 0, | 307 gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_left_spy_frame_), 0, |
308 kOTRBottomSpacing, kOTRSideSpacing, kOTRSideSpacing); | 308 kOTRBottomSpacing, kOTRSideSpacing, kOTRSideSpacing); |
309 gtk_box_pack_start(GTK_BOX(container_hbox_), titlebar_left_spy_frame_, | 309 gtk_box_pack_start(GTK_BOX(container_hbox_), titlebar_left_spy_frame_, |
310 FALSE, FALSE, 0); | 310 FALSE, FALSE, 0); |
311 } | 311 } |
312 | 312 |
313 // If multi-profile is enabled set up profile button and login notifications. | 313 // If multi-profile is enabled set up profile button and login notifications. |
314 // The button lives in its own vbox in container_hbox_. | 314 // The button lives in its own vbox in container_hbox_. |
315 ProfileInfoCache& cache = | 315 ProfileInfoInterface& cache = |
316 g_browser_process->profile_manager()->GetProfileInfoCache(); | 316 g_browser_process->profile_manager()->GetProfileInfo(); |
317 if (ProfileManager::IsMultipleProfilesEnabled() && | 317 if (ProfileManager::IsMultipleProfilesEnabled() && |
318 cache.GetNumberOfProfiles() > 1 && | 318 cache.GetNumberOfProfiles() > 1 && |
319 !browser_window_->browser()->profile()->IsOffTheRecord()) { | 319 !browser_window_->browser()->profile()->IsOffTheRecord()) { |
320 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs(); | 320 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs(); |
321 usernamePref_.Init(prefs::kGoogleServicesUsername, prefs, this); | 321 usernamePref_.Init(prefs::kGoogleServicesUsername, prefs, this); |
322 | 322 |
323 titlebar_profile_vbox_ = gtk_vbox_new(FALSE, 0); | 323 titlebar_profile_vbox_ = gtk_vbox_new(FALSE, 0); |
324 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_profile_vbox_, | 324 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_profile_vbox_, |
325 FALSE, FALSE, 0); | 325 FALSE, FALSE, 0); |
326 gtk_widget_show_all(titlebar_profile_vbox_); | 326 gtk_widget_show_all(titlebar_profile_vbox_); |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 ui::SimpleMenuModel::Delegate* delegate) | 1047 ui::SimpleMenuModel::Delegate* delegate) |
1048 : SimpleMenuModel(delegate) { | 1048 : SimpleMenuModel(delegate) { |
1049 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1049 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
1050 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1050 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
1051 AddSeparator(); | 1051 AddSeparator(); |
1052 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1052 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
1053 AddSeparator(); | 1053 AddSeparator(); |
1054 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1054 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
1055 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1055 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
1056 } | 1056 } |
OLD | NEW |