Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 8368016: Rebase BookmarkBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only SelectAll on the title textfield when the buble is first shown. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.cc ('k') | ui/aura_shell/examples/bubble.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 home_->SetImage(views::CustomButton::BS_PUSHED, 716 home_->SetImage(views::CustomButton::BS_PUSHED,
717 tp->GetBitmapNamed(IDR_HOME_P)); 717 tp->GetBitmapNamed(IDR_HOME_P));
718 718
719 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); 719 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL));
720 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); 720 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT));
721 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); 721 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED));
722 } 722 }
723 723
724 void ToolbarView::ShowCriticalNotification() { 724 void ToolbarView::ShowCriticalNotification() {
725 #if defined(OS_WIN) 725 #if defined(OS_WIN)
726 gfx::Point screen_loc(app_menu_->width() / 2, app_menu_->height());
727 views::View::ConvertPointToScreen(app_menu_, &screen_loc);
728
729 CriticalNotificationBubbleView* bubble_delegate = 726 CriticalNotificationBubbleView* bubble_delegate =
730 new CriticalNotificationBubbleView(screen_loc); 727 new CriticalNotificationBubbleView(app_menu_);
731 views::BubbleDelegateView::CreateBubble(bubble_delegate, GetWidget()); 728 views::BubbleDelegateView::CreateBubble(bubble_delegate);
732 bubble_delegate->StartFade(true); 729 bubble_delegate->StartFade(true);
733 #endif 730 #endif
734 } 731 }
735 732
736 void ToolbarView::UpdateAppMenuState() { 733 void ToolbarView::UpdateAppMenuState() {
737 string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP); 734 string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
738 if (IsUpgradeRecommended()) { 735 if (IsUpgradeRecommended()) {
739 accname_app = l10n_util::GetStringFUTF16( 736 accname_app = l10n_util::GetStringFUTF16(
740 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); 737 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
741 } 738 }
742 app_menu_->SetAccessibleName(accname_app); 739 app_menu_->SetAccessibleName(accname_app);
743 740
744 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); 741 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL));
745 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); 742 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT));
746 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); 743 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED));
747 SchedulePaint(); 744 SchedulePaint();
748 } 745 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.cc ('k') | ui/aura_shell/examples/bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698