| 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } | 482 } |
| 483 | 483 |
| 484 void PanelFrameView::UpdateWindowIcon() { | 484 void PanelFrameView::UpdateWindowIcon() { |
| 485 title_icon_->SchedulePaint(); | 485 title_icon_->SchedulePaint(); |
| 486 } | 486 } |
| 487 | 487 |
| 488 void PanelFrameView::UpdateWindowTitle() { | 488 void PanelFrameView::UpdateWindowTitle() { |
| 489 title_label_->SetText(panel_view_->panel()->GetWindowTitle()); | 489 title_label_->SetText(panel_view_->panel()->GetWindowTitle()); |
| 490 } | 490 } |
| 491 | 491 |
| 492 void PanelFrameView::SizeConstraintsChanged() { |
| 493 } |
| 494 |
| 492 gfx::Size PanelFrameView::GetPreferredSize() const { | 495 gfx::Size PanelFrameView::GetPreferredSize() const { |
| 493 gfx::Size pref_size = | 496 gfx::Size pref_size = |
| 494 panel_view_->window()->client_view()->GetPreferredSize(); | 497 panel_view_->window()->client_view()->GetPreferredSize(); |
| 495 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height()); | 498 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height()); |
| 496 return panel_view_->window()->non_client_view()-> | 499 return panel_view_->window()->non_client_view()-> |
| 497 GetWindowBoundsForClientBounds(bounds).size(); | 500 GetWindowBoundsForClientBounds(bounds).size(); |
| 498 } | 501 } |
| 499 | 502 |
| 500 const char* PanelFrameView::GetClassName() const { | 503 const char* PanelFrameView::GetClassName() const { |
| 501 return kViewClassName; | 504 return kViewClassName; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 #endif | 770 #endif |
| 768 } | 771 } |
| 769 | 772 |
| 770 bool PanelFrameView::IsWithinResizingArea( | 773 bool PanelFrameView::IsWithinResizingArea( |
| 771 const gfx::Point& mouse_location) const { | 774 const gfx::Point& mouse_location) const { |
| 772 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse(); | 775 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse(); |
| 773 int edge_hittest = GetFrameEdgeHitTest( | 776 int edge_hittest = GetFrameEdgeHitTest( |
| 774 mouse_location, size(), PanelView::kResizeInsideBoundsSize, resizability); | 777 mouse_location, size(), PanelView::kResizeInsideBoundsSize, resizability); |
| 775 return edge_hittest != HTNOWHERE; | 778 return edge_hittest != HTNOWHERE; |
| 776 } | 779 } |
| OLD | NEW |