| 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/views/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 void ToolbarView::ShowCriticalNotification() { | 724 void ToolbarView::ShowCriticalNotification() { |
| 725 #if defined(OS_WIN) && !defined(USE_AURA) | 725 #if defined(OS_WIN) && !defined(USE_AURA) |
| 726 gfx::Point screen_loc; | 726 gfx::Point screen_loc; |
| 727 views::View::ConvertPointToScreen(app_menu_, &screen_loc); | 727 views::View::ConvertPointToScreen(app_menu_, &screen_loc); |
| 728 | 728 |
| 729 CriticalNotificationBubbleView* critical_notification_bubble = | 729 CriticalNotificationBubbleView* critical_notification_bubble = |
| 730 new CriticalNotificationBubbleView(); | 730 new CriticalNotificationBubbleView(); |
| 731 Bubble* bubble = Bubble::Show(GetWidget(), | 731 Bubble* bubble = Bubble::Show(GetWidget(), |
| 732 gfx::Rect(screen_loc, app_menu_->size()), | 732 gfx::Rect(screen_loc, app_menu_->size()), |
| 733 views::BubbleBorder::TOP_RIGHT, | 733 views::BubbleBorder::TOP_RIGHT, |
| 734 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, |
| 734 critical_notification_bubble, | 735 critical_notification_bubble, |
| 735 critical_notification_bubble); | 736 critical_notification_bubble); |
| 736 bubble->set_close_on_deactivate(false); | 737 bubble->set_close_on_deactivate(false); |
| 737 critical_notification_bubble->set_bubble(bubble); | 738 critical_notification_bubble->set_bubble(bubble); |
| 738 #endif | 739 #endif |
| 739 } | 740 } |
| 740 | 741 |
| 741 void ToolbarView::UpdateAppMenuBadge() { | 742 void ToolbarView::UpdateAppMenuBadge() { |
| 742 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); | 743 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); |
| 743 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); | 744 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); |
| 744 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); | 745 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); |
| 745 SchedulePaint(); | 746 SchedulePaint(); |
| 746 } | 747 } |
| OLD | NEW |