| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/browser_titlebar.h" | 5 #include "chrome/browser/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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 // those. | 431 // those. |
| 432 } | 432 } |
| 433 } | 433 } |
| 434 | 434 |
| 435 // If we are in incognito mode, add the spy guy to either the end of the left | 435 // If we are in incognito mode, add the spy guy to either the end of the left |
| 436 // or the beginning of the right depending on which side has fewer buttons. | 436 // or the beginning of the right depending on which side has fewer buttons. |
| 437 if (browser_window_->browser()->profile()->IsOffTheRecord() && | 437 if (browser_window_->browser()->profile()->IsOffTheRecord() && |
| 438 browser_window_->browser()->type() == Browser::TYPE_NORMAL) { | 438 browser_window_->browser()->type() == Browser::TYPE_NORMAL) { |
| 439 GtkWidget* spy_guy = gtk_image_new_from_pixbuf(GetOTRAvatar()); | 439 GtkWidget* spy_guy = gtk_image_new_from_pixbuf(GetOTRAvatar()); |
| 440 gtk_misc_set_alignment(GTK_MISC(spy_guy), 0.0, 1.0); | 440 gtk_misc_set_alignment(GTK_MISC(spy_guy), 0.0, 1.0); |
| 441 gtk_widget_set_size_request(spy_guy, -1, 0); |
| 441 gtk_widget_show(spy_guy); | 442 gtk_widget_show(spy_guy); |
| 442 | 443 |
| 443 // Remove previous state. | 444 // Remove previous state. |
| 444 gtk_util::RemoveAllChildren(titlebar_left_spy_frame_); | 445 gtk_util::RemoveAllChildren(titlebar_left_spy_frame_); |
| 445 gtk_util::RemoveAllChildren(titlebar_right_spy_frame_); | 446 gtk_util::RemoveAllChildren(titlebar_right_spy_frame_); |
| 446 | 447 |
| 447 if (right_count > left_count) { | 448 if (right_count > left_count) { |
| 448 gtk_container_add(GTK_CONTAINER(titlebar_left_spy_frame_), spy_guy); | 449 gtk_container_add(GTK_CONTAINER(titlebar_left_spy_frame_), spy_guy); |
| 449 gtk_widget_show(titlebar_left_spy_frame_); | 450 gtk_widget_show(titlebar_left_spy_frame_); |
| 450 gtk_widget_hide(titlebar_right_spy_frame_); | 451 gtk_widget_hide(titlebar_right_spy_frame_); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 menus::SimpleMenuModel::Delegate* delegate) | 926 menus::SimpleMenuModel::Delegate* delegate) |
| 926 : SimpleMenuModel(delegate) { | 927 : SimpleMenuModel(delegate) { |
| 927 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 928 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
| 928 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 929 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
| 929 AddSeparator(); | 930 AddSeparator(); |
| 930 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 931 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
| 931 AddSeparator(); | 932 AddSeparator(); |
| 932 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 933 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
| 933 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 934 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
| 934 } | 935 } |
| OLD | NEW |