| 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 } | 578 } |
| 579 | 579 |
| 580 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { | 580 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { |
| 581 // This function is queried during the creation of the window as the | 581 // This function is queried during the creation of the window as the |
| 582 // TabIconView we host is initialized, so we need to NULL check the selected | 582 // TabIconView we host is initialized, so we need to NULL check the selected |
| 583 // WebContents because in this condition there is not yet a selected tab. | 583 // WebContents because in this condition there is not yet a selected tab. |
| 584 WebContents* current_tab = browser_view()->GetSelectedWebContents(); | 584 WebContents* current_tab = browser_view()->GetSelectedWebContents(); |
| 585 return current_tab ? current_tab->IsLoading() : false; | 585 return current_tab ? current_tab->IsLoading() : false; |
| 586 } | 586 } |
| 587 | 587 |
| 588 SkBitmap PanelBrowserFrameView::GetFaviconForTabIconView() { | 588 gfx::ImageSkia PanelBrowserFrameView::GetFaviconForTabIconView() { |
| 589 return frame()->widget_delegate()->GetWindowIcon(); | 589 return frame()->widget_delegate()->GetWindowIcon(); |
| 590 } | 590 } |
| 591 | 591 |
| 592 int PanelBrowserFrameView::NonClientBorderThickness() const { | 592 int PanelBrowserFrameView::NonClientBorderThickness() const { |
| 593 if (CanResize()) | 593 if (CanResize()) |
| 594 return kResizableBorderThickness + kResizableClientEdgeThickness; | 594 return kResizableBorderThickness + kResizableClientEdgeThickness; |
| 595 else | 595 else |
| 596 return kNonResizableBorderThickness + kNonResizableClientEdgeThickness; | 596 return kNonResizableBorderThickness + kNonResizableClientEdgeThickness; |
| 597 } | 597 } |
| 598 | 598 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 } | 798 } |
| 799 | 799 |
| 800 bool PanelBrowserFrameView::CanResize() const { | 800 bool PanelBrowserFrameView::CanResize() const { |
| 801 return panel_browser_view_->panel()->CanResizeByMouse() != | 801 return panel_browser_view_->panel()->CanResizeByMouse() != |
| 802 panel::NOT_RESIZABLE; | 802 panel::NOT_RESIZABLE; |
| 803 } | 803 } |
| 804 | 804 |
| 805 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { | 805 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { |
| 806 return height() <= kTitlebarHeight; | 806 return height() <= kTitlebarHeight; |
| 807 } | 807 } |
| OLD | NEW |