views: SizeConstraintsChanged has become required

This commit is contained in:
Cheng Zhao 2014-12-09 16:52:11 -08:00
parent 22c4911b58
commit 1853bef39a
4 changed files with 8 additions and 0 deletions

View file

@ -95,6 +95,9 @@ void FramelessView::UpdateWindowIcon() {
void FramelessView::UpdateWindowTitle() {
}
void FramelessView::SizeConstraintsChanged() {
}
gfx::Size FramelessView::GetPreferredSize() const {
return frame_->non_client_view()->GetWindowBoundsForClientBounds(
gfx::Rect(frame_->client_view()->GetPreferredSize())).size();

View file

@ -36,6 +36,7 @@ class FramelessView : public views::NonClientFrameView {
void ResetWindowControls() override;
void UpdateWindowIcon() override;
void UpdateWindowTitle() override;
void SizeConstraintsChanged() override;
// Overridden from View:
gfx::Size GetPreferredSize() const override;

View file

@ -39,6 +39,9 @@ int WinFrameView::NonClientHitTest(const gfx::Point& point) {
return FramelessView::NonClientHitTest(point);
}
void WinFrameView::SizeConstraintsChanged() override {
}
gfx::Size WinFrameView::GetMinimumSize() const {
gfx::Size size = FramelessView::GetMinimumSize();
return gfx::win::DIPToScreenSize(size);

View file

@ -18,6 +18,7 @@ class WinFrameView : public FramelessView {
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;
int NonClientHitTest(const gfx::Point& point) override;
void SizeConstraintsChanged() override;
// views::View:
gfx::Size GetMinimumSize() const override;