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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); | 587 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); |
588 canvas->DrawBitmapInt(*kPopupBackgroundEdge, | 588 canvas->DrawBitmapInt(*kPopupBackgroundEdge, |
589 width() - kPopupBackgroundEdge->width(), top_spacing); | 589 width() - kPopupBackgroundEdge->width(), top_spacing); |
590 } | 590 } |
591 | 591 |
592 // For glass, we need to draw a black line below the location bar to separate | 592 // For glass, we need to draw a black line below the location bar to separate |
593 // it from the content area. For non-glass, the NonClientView draws the | 593 // it from the content area. For non-glass, the NonClientView draws the |
594 // toolbar background below the location bar for us. | 594 // toolbar background below the location bar for us. |
595 // NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()! | 595 // NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()! |
596 if (GetWidget()->ShouldUseNativeFrame()) | 596 if (GetWidget()->ShouldUseNativeFrame()) |
597 canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1); | 597 canvas->FillRect(SK_ColorBLACK, gfx::Rect(0, height() - 1, width(), 1)); |
598 } | 598 } |
599 | 599 |
600 // Note this method is ignored on Windows, but needs to be implemented for | 600 // Note this method is ignored on Windows, but needs to be implemented for |
601 // linux, where it is called before CanDrop(). | 601 // linux, where it is called before CanDrop(). |
602 bool ToolbarView::GetDropFormats( | 602 bool ToolbarView::GetDropFormats( |
603 int* formats, | 603 int* formats, |
604 std::set<OSExchangeData::CustomFormat>* custom_formats) { | 604 std::set<OSExchangeData::CustomFormat>* custom_formats) { |
605 *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING; | 605 *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING; |
606 return true; | 606 return true; |
607 } | 607 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 accname_app = l10n_util::GetStringFUTF16( | 744 accname_app = l10n_util::GetStringFUTF16( |
745 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); | 745 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); |
746 } | 746 } |
747 app_menu_->SetAccessibleName(accname_app); | 747 app_menu_->SetAccessibleName(accname_app); |
748 | 748 |
749 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); | 749 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); |
750 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); | 750 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); |
751 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); | 751 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); |
752 SchedulePaint(); | 752 SchedulePaint(); |
753 } | 753 } |
OLD | NEW |