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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); | 576 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); |
577 canvas->DrawBitmapInt(*kPopupBackgroundEdge, | 577 canvas->DrawBitmapInt(*kPopupBackgroundEdge, |
578 width() - kPopupBackgroundEdge->width(), top_spacing); | 578 width() - kPopupBackgroundEdge->width(), top_spacing); |
579 } | 579 } |
580 | 580 |
581 // For glass, we need to draw a black line below the location bar to separate | 581 // For glass, we need to draw a black line below the location bar to separate |
582 // it from the content area. For non-glass, the NonClientView draws the | 582 // it from the content area. For non-glass, the NonClientView draws the |
583 // toolbar background below the location bar for us. | 583 // toolbar background below the location bar for us. |
584 // NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()! | 584 // NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()! |
585 if (GetWidget()->ShouldUseNativeFrame()) | 585 if (GetWidget()->ShouldUseNativeFrame()) |
586 canvas->FillRect(SK_ColorBLACK, gfx::Rect(0, height() - 1, width(), 1)); | 586 canvas->FillRect(gfx::Rect(0, height() - 1, width(), 1), SK_ColorBLACK); |
587 } | 587 } |
588 | 588 |
589 // Note this method is ignored on Windows, but needs to be implemented for | 589 // Note this method is ignored on Windows, but needs to be implemented for |
590 // linux, where it is called before CanDrop(). | 590 // linux, where it is called before CanDrop(). |
591 bool ToolbarView::GetDropFormats( | 591 bool ToolbarView::GetDropFormats( |
592 int* formats, | 592 int* formats, |
593 std::set<OSExchangeData::CustomFormat>* custom_formats) { | 593 std::set<OSExchangeData::CustomFormat>* custom_formats) { |
594 *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING; | 594 *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING; |
595 return true; | 595 return true; |
596 } | 596 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 accname_app = l10n_util::GetStringFUTF16( | 732 accname_app = l10n_util::GetStringFUTF16( |
733 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); | 733 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); |
734 } | 734 } |
735 app_menu_->SetAccessibleName(accname_app); | 735 app_menu_->SetAccessibleName(accname_app); |
736 | 736 |
737 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); | 737 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); |
738 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); | 738 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); |
739 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); | 739 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); |
740 SchedulePaint(); | 740 SchedulePaint(); |
741 } | 741 } |
OLD | NEW |