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/about_chrome_view.h" | 5 #include "chrome/browser/ui/views/about_chrome_view.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <commdlg.h> | 8 #include <commdlg.h> |
9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
10 | 10 |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 if (GetWidget()) | 776 if (GetWidget()) |
777 GetDialogClientView()->UpdateDialogButtons(); | 777 GetDialogClientView()->UpdateDialogButtons(); |
778 } | 778 } |
779 | 779 |
780 int AboutChromeView::EnlargeWindowSizeIfNeeded() { | 780 int AboutChromeView::EnlargeWindowSizeIfNeeded() { |
781 if (!error_label_ || error_label_->text().empty()) | 781 if (!error_label_ || error_label_->text().empty()) |
782 return 0; | 782 return 0; |
783 | 783 |
784 // This will enlarge the window each time the function is called, which is | 784 // This will enlarge the window each time the function is called, which is |
785 // fine since we only receive status once from Google Update. | 785 // fine since we only receive status once from Google Update. |
786 gfx::Rect window_rect = GetWidget()->GetWindowScreenBounds(); | 786 gfx::Rect window_rect = GetWidget()->GetWindowBoundsInScreen(); |
787 int height = error_label_->GetHeightForWidth( | 787 int height = error_label_->GetHeightForWidth( |
788 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + | 788 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + |
789 views::kRelatedControlVerticalSpacing; | 789 views::kRelatedControlVerticalSpacing; |
790 window_rect.set_height(window_rect.height() + height); | 790 window_rect.set_height(window_rect.height() + height); |
791 GetWidget()->SetBounds(window_rect); | 791 GetWidget()->SetBounds(window_rect); |
792 | 792 |
793 return height; | 793 return height; |
794 } | 794 } |
795 | 795 |
796 #endif | 796 #endif |
OLD | NEW |