| 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 panel_browser_view_->panel()->OnMinimizeButtonClicked(modifier); | 567 panel_browser_view_->panel()->OnMinimizeButtonClicked(modifier); |
| 568 else if (sender == restore_button_) | 568 else if (sender == restore_button_) |
| 569 panel_browser_view_->panel()->OnRestoreButtonClicked(modifier); | 569 panel_browser_view_->panel()->OnRestoreButtonClicked(modifier); |
| 570 } | 570 } |
| 571 } | 571 } |
| 572 | 572 |
| 573 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { | 573 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { |
| 574 // This function is queried during the creation of the window as the | 574 // This function is queried during the creation of the window as the |
| 575 // TabIconView we host is initialized, so we need to NULL check the selected | 575 // TabIconView we host is initialized, so we need to NULL check the selected |
| 576 // WebContents because in this condition there is not yet a selected tab. | 576 // WebContents because in this condition there is not yet a selected tab. |
| 577 WebContents* current_tab = browser_view()->GetSelectedWebContents(); | 577 WebContents* current_tab = browser_view()->GetActiveWebContents(); |
| 578 return current_tab ? current_tab->IsLoading() : false; | 578 return current_tab ? current_tab->IsLoading() : false; |
| 579 } | 579 } |
| 580 | 580 |
| 581 gfx::ImageSkia PanelBrowserFrameView::GetFaviconForTabIconView() { | 581 gfx::ImageSkia PanelBrowserFrameView::GetFaviconForTabIconView() { |
| 582 return frame()->widget_delegate()->GetWindowIcon(); | 582 return frame()->widget_delegate()->GetWindowIcon(); |
| 583 } | 583 } |
| 584 | 584 |
| 585 int PanelBrowserFrameView::NonClientBorderThickness() const { | 585 int PanelBrowserFrameView::NonClientBorderThickness() const { |
| 586 if (CanResize()) | 586 if (CanResize()) |
| 587 return kResizableBorderThickness; | 587 return kResizableBorderThickness; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 799 } |
| 800 | 800 |
| 801 bool PanelBrowserFrameView::CanResize() const { | 801 bool PanelBrowserFrameView::CanResize() const { |
| 802 return panel_browser_view_->panel()->CanResizeByMouse() != | 802 return panel_browser_view_->panel()->CanResizeByMouse() != |
| 803 panel::NOT_RESIZABLE; | 803 panel::NOT_RESIZABLE; |
| 804 } | 804 } |
| 805 | 805 |
| 806 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { | 806 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { |
| 807 return height() <= panel::kTitlebarHeight; | 807 return height() <= panel::kTitlebarHeight; |
| 808 } | 808 } |
| OLD | NEW |