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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 !browser_window_->browser()->profile()->IsOffTheRecord()) { | 314 !browser_window_->browser()->profile()->IsOffTheRecord()) { |
315 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs(); | 315 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs(); |
316 usernamePref_.Init(prefs::kGoogleServicesUsername, prefs, this); | 316 usernamePref_.Init(prefs::kGoogleServicesUsername, prefs, this); |
317 | 317 |
318 titlebar_profile_vbox_ = gtk_vbox_new(FALSE, 0); | 318 titlebar_profile_vbox_ = gtk_vbox_new(FALSE, 0); |
319 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_profile_vbox_, | 319 gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_profile_vbox_, |
320 FALSE, FALSE, 0); | 320 FALSE, FALSE, 0); |
321 gtk_widget_show_all(titlebar_profile_vbox_); | 321 gtk_widget_show_all(titlebar_profile_vbox_); |
322 | 322 |
323 profile_button_.reset(new ProfileMenuButton( | 323 profile_button_.reset(new ProfileMenuButton( |
324 browser_window_->browser()->profile())); | 324 browser_window_->browser())); |
325 gtk_box_pack_start(GTK_BOX(titlebar_profile_vbox_), | 325 gtk_box_pack_start(GTK_BOX(titlebar_profile_vbox_), |
326 profile_button_->widget(), FALSE, FALSE, 0); | 326 profile_button_->widget(), FALSE, FALSE, 0); |
327 profile_button_->UpdateText(); | 327 profile_button_->UpdateText(); |
328 } | 328 } |
329 | 329 |
330 if (browser_window_->browser()->profile()->IsOffTheRecord() && | 330 if (browser_window_->browser()->profile()->IsOffTheRecord() && |
331 browser_window_->browser()->is_type_tabbed()) { | 331 browser_window_->browser()->is_type_tabbed()) { |
332 titlebar_right_spy_frame_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); | 332 titlebar_right_spy_frame_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); |
333 gtk_widget_set_no_show_all(titlebar_right_spy_frame_, TRUE); | 333 gtk_widget_set_no_show_all(titlebar_right_spy_frame_, TRUE); |
334 gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_right_spy_frame_), 0, | 334 gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_right_spy_frame_), 0, |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 ui::SimpleMenuModel::Delegate* delegate) | 1043 ui::SimpleMenuModel::Delegate* delegate) |
1044 : SimpleMenuModel(delegate) { | 1044 : SimpleMenuModel(delegate) { |
1045 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1045 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
1046 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1046 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
1047 AddSeparator(); | 1047 AddSeparator(); |
1048 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1048 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
1049 AddSeparator(); | 1049 AddSeparator(); |
1050 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1050 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
1051 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1051 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
1052 } | 1052 } |
OLD | NEW |