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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 gfx::ImageSkia* normal_background = 788 gfx::ImageSkia* normal_background =
789 GetThemeProvider()->GetImageSkiaNamed(IDR_CONTENT_TOP_CENTER); 789 GetThemeProvider()->GetImageSkiaNamed(IDR_CONTENT_TOP_CENTER);
790 size.SetToMax( 790 size.SetToMax(
791 gfx::Size(0, normal_background->height() - content_shadow_height())); 791 gfx::Size(0, normal_background->height() - content_shadow_height()));
792 } 792 }
793 } else if (size.height() == 0) { 793 } else if (size.height() == 0) {
794 // Location mode with a 0 height location bar. If on ash, expand by one 794 // Location mode with a 0 height location bar. If on ash, expand by one
795 // pixel to show a border in the title bar, otherwise leave the size as zero 795 // pixel to show a border in the title bar, otherwise leave the size as zero
796 // height. 796 // height.
797 const int kAshBorderSpacing = 1; 797 const int kAshBorderSpacing = 1;
798 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) 798 if (browser_->host_desktop_type() == ui::HOST_DESKTOP_TYPE_ASH)
799 size.Enlarge(0, kAshBorderSpacing); 799 size.Enlarge(0, kAshBorderSpacing);
800 } else { 800 } else {
801 const int kPopupBottomSpacingGlass = 1; 801 const int kPopupBottomSpacingGlass = 1;
802 const int kPopupBottomSpacingNonGlass = 2; 802 const int kPopupBottomSpacingNonGlass = 2;
803 size.Enlarge( 803 size.Enlarge(
804 0, 804 0,
805 PopupTopSpacing() + (GetWidget()->ShouldWindowContentsBeTransparent() ? 805 PopupTopSpacing() + (GetWidget()->ShouldWindowContentsBeTransparent() ?
806 kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass)); 806 kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass));
807 } 807 }
808 return size; 808 return size;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 848 }
849 849
850 void ToolbarView::OnShowHomeButtonChanged() { 850 void ToolbarView::OnShowHomeButtonChanged() {
851 Layout(); 851 Layout();
852 SchedulePaint(); 852 SchedulePaint();
853 } 853 }
854 854
855 int ToolbarView::content_shadow_height() const { 855 int ToolbarView::content_shadow_height() const {
856 ui::ThemeProvider* theme_provider = GetThemeProvider(); 856 ui::ThemeProvider* theme_provider = GetThemeProvider();
857 return theme_provider->GetDisplayProperty( 857 return theme_provider->GetDisplayProperty(
858 browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH 858 browser_->host_desktop_type() == ui::HOST_DESKTOP_TYPE_ASH
859 ? ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH 859 ? ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT_ASH
860 : ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT); 860 : ThemeProperties::PROPERTY_TOOLBAR_VIEW_CONTENT_SHADOW_HEIGHT);
861 } 861 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698