OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/panels/panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 gfx::Size PanelBrowserFrameView::NonClientAreaSize() const { | 618 gfx::Size PanelBrowserFrameView::NonClientAreaSize() const { |
619 return gfx::Size(NonClientBorderThickness() * 2, | 619 return gfx::Size(NonClientBorderThickness() * 2, |
620 NonClientTopBorderHeight() + NonClientBorderThickness()); | 620 NonClientTopBorderHeight() + NonClientBorderThickness()); |
621 } | 621 } |
622 | 622 |
623 int PanelBrowserFrameView::IconOnlyWidth() const { | 623 int PanelBrowserFrameView::IconOnlyWidth() const { |
624 return NonClientBorderThickness() * 2 + kIconAndBorderSpacing * 2 + kIconSize; | 624 return NonClientBorderThickness() * 2 + kIconAndBorderSpacing * 2 + kIconSize; |
625 } | 625 } |
626 | 626 |
627 gfx::Size PanelBrowserFrameView::IconOnlySize() const { | |
628 return gfx::Size(IconOnlyWidth(), NonClientTopBorderHeight()); | |
629 } | |
630 | |
631 bool PanelBrowserFrameView::UsingDefaultTheme(PaintState paint_state) const { | 627 bool PanelBrowserFrameView::UsingDefaultTheme(PaintState paint_state) const { |
632 // No theme is provided for attention painting. | 628 // No theme is provided for attention painting. |
633 if (paint_state == PAINT_FOR_ATTENTION) | 629 if (paint_state == PAINT_FOR_ATTENTION) |
634 return true; | 630 return true; |
635 | 631 |
636 ThemeService* theme_service = ThemeServiceFactory::GetForProfile( | 632 ThemeService* theme_service = ThemeServiceFactory::GetForProfile( |
637 panel_browser_view_->panel()->browser()->profile()); | 633 panel_browser_view_->panel()->browser()->profile()); |
638 return theme_service->UsingDefaultTheme(); | 634 return theme_service->UsingDefaultTheme(); |
639 } | 635 } |
640 | 636 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 } | 807 } |
812 | 808 |
813 bool PanelBrowserFrameView::CanResize() const { | 809 bool PanelBrowserFrameView::CanResize() const { |
814 return panel_browser_view_->panel()->CanResizeByMouse() != | 810 return panel_browser_view_->panel()->CanResizeByMouse() != |
815 panel::NOT_RESIZABLE; | 811 panel::NOT_RESIZABLE; |
816 } | 812 } |
817 | 813 |
818 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { | 814 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { |
819 return height() <= kTitlebarHeight; | 815 return height() <= kTitlebarHeight; |
820 } | 816 } |
OLD | NEW |