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/views/panels/panel_frame_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/panels/panel.h" | 7 #include "chrome/browser/ui/panels/panel.h" |
8 #include "chrome/browser/ui/panels/panel_constants.h" | 8 #include "chrome/browser/ui/panels/panel_constants.h" |
9 #include "chrome/browser/ui/views/panels/panel_view.h" | 9 #include "chrome/browser/ui/views/panels/panel_view.h" |
10 #include "chrome/browser/ui/views/tab_icon_view.h" | 10 #include "chrome/browser/ui/views/tab_icon_view.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 const char* PanelFrameView::GetClassName() const { | 500 const char* PanelFrameView::GetClassName() const { |
501 return kViewClassName; | 501 return kViewClassName; |
502 } | 502 } |
503 | 503 |
504 gfx::Size PanelFrameView::GetMinimumSize() const { | 504 gfx::Size PanelFrameView::GetMinimumSize() const { |
505 return panel_view_->GetMinimumSize(); | 505 return panel_view_->GetMinimumSize(); |
506 } | 506 } |
507 | 507 |
508 gfx::Size PanelFrameView::GetMaximumSize() { | 508 gfx::Size PanelFrameView::GetMaximumSize() const { |
509 return panel_view_->GetMaximumSize(); | 509 return panel_view_->GetMaximumSize(); |
510 } | 510 } |
511 | 511 |
512 void PanelFrameView::Layout() { | 512 void PanelFrameView::Layout() { |
513 is_frameless_ = ShouldRenderAsFrameless(); | 513 is_frameless_ = ShouldRenderAsFrameless(); |
514 | 514 |
515 // Layout the close button. | 515 // Layout the close button. |
516 int right = width(); | 516 int right = width(); |
517 close_button_->SetBounds( | 517 close_button_->SetBounds( |
518 width() - panel::kTitlebarRightPadding - panel::kPanelButtonSize, | 518 width() - panel::kTitlebarRightPadding - panel::kPanelButtonSize, |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 759 |
760 // Draw the left border. | 760 // Draw the left border. |
761 canvas->TileImageInt(left_image, | 761 canvas->TileImageInt(left_image, |
762 0, | 762 0, |
763 top_left_image.height(), | 763 top_left_image.height(), |
764 left_image.width(), | 764 left_image.width(), |
765 height() - top_left_image.height() - | 765 height() - top_left_image.height() - |
766 bottom_left_image.height()); | 766 bottom_left_image.height()); |
767 #endif | 767 #endif |
768 } | 768 } |
OLD | NEW |