| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 UpdateMaximizeRestoreVisibility(); | 599 UpdateMaximizeRestoreVisibility(); |
| 600 } | 600 } |
| 601 | 601 |
| 602 void BrowserTitlebar::UpdateTitleAndIcon() { | 602 void BrowserTitlebar::UpdateTitleAndIcon() { |
| 603 if (!app_mode_title_) | 603 if (!app_mode_title_) |
| 604 return; | 604 return; |
| 605 | 605 |
| 606 // Get the page title and elide it to the available space. | 606 // Get the page title and elide it to the available space. |
| 607 base::string16 title = | 607 base::string16 title = |
| 608 browser_window_->browser()->GetWindowTitleForCurrentTab(); | 608 browser_window_->browser()->GetWindowTitleForCurrentTab(); |
| 609 gtk_label_set_text(GTK_LABEL(app_mode_title_), UTF16ToUTF8(title).c_str()); | 609 gtk_label_set_text(GTK_LABEL(app_mode_title_), |
| 610 base::UTF16ToUTF8(title).c_str()); |
| 610 | 611 |
| 611 if (browser_window_->browser()->is_app()) { | 612 if (browser_window_->browser()->is_app()) { |
| 612 switch (browser_window_->browser()->type()) { | 613 switch (browser_window_->browser()->type()) { |
| 613 case Browser::TYPE_POPUP: { | 614 case Browser::TYPE_POPUP: { |
| 614 // Update the system app icon. We don't need to update the icon in the | 615 // Update the system app icon. We don't need to update the icon in the |
| 615 // top left of the custom frame, that will get updated when the | 616 // top left of the custom frame, that will get updated when the |
| 616 // throbber is updated. | 617 // throbber is updated. |
| 617 Profile* profile = browser_window_->browser()->profile(); | 618 Profile* profile = browser_window_->browser()->profile(); |
| 618 gfx::Image icon = browser_window_->browser()->GetCurrentPageIcon(); | 619 gfx::Image icon = browser_window_->browser()->GetCurrentPageIcon(); |
| 619 if (icon.IsEmpty()) { | 620 if (icon.IsEmpty()) { |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 ui::SimpleMenuModel::Delegate* delegate) | 1098 ui::SimpleMenuModel::Delegate* delegate) |
| 1098 : SimpleMenuModel(delegate) { | 1099 : SimpleMenuModel(delegate) { |
| 1099 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); | 1100 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); |
| 1100 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); | 1101 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); |
| 1101 AddSeparator(ui::NORMAL_SEPARATOR); | 1102 AddSeparator(ui::NORMAL_SEPARATOR); |
| 1102 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 1103 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
| 1103 AddSeparator(ui::NORMAL_SEPARATOR); | 1104 AddSeparator(ui::NORMAL_SEPARATOR); |
| 1104 AddCheckItemWithStringId(kShowWindowDecorationsCommand, | 1105 AddCheckItemWithStringId(kShowWindowDecorationsCommand, |
| 1105 IDS_SHOW_WINDOW_DECORATIONS_MENU); | 1106 IDS_SHOW_WINDOW_DECORATIONS_MENU); |
| 1106 } | 1107 } |
| OLD | NEW |