|
views: implement width snapping for DialogDelegateViews
This change:
1) Adds ViewsDelegate::GetSnappedDialogWidth, which snaps a
dialog width up to the next allowable size;
2) Adds DialogDelegateView::GetPreferredSize, which snaps widths
using ViewsDelegate::GetSnappedDialogWidth;
3) Forbids subclasses of DialogDelegateView to override GetPreferredSize;
4) Adds DialogDelegateView::GetUnsnappedPreferredSize to allow dialogs to
express their preferred size before snapping;
5) Converts all existing overrides of GetPreferredSize by subclasses of
DialogDelegateView to instead override GetUnsnappedPreferredSize
See also: https://codereview.chromium.org/2750063002/
BUG= 635173
Total comments: 31
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+132 lines, -110 lines) |
Patch |
|
M |
chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_container.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
2 comments
|
Download
|
|
M |
chrome/browser/ui/views/autofill/save_card_bubble_views.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/autofill/save_card_bubble_views.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/bookmarks/bookmark_editor_view.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/chrome_views_delegate.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/chrome_views_delegate.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/collected_cookies_views.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/collected_cookies_views.cc
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/content_setting_bubble_contents.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/content_setting_bubble_contents.cc
|
View
|
|
1 chunk |
+6 lines, -11 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/create_application_shortcut_view.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/create_application_shortcut_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
2 comments
|
Download
|
|
M |
chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/device_chooser_content_view.cc
|
View
|
|
1 chunk |
+1 line, -7 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/extensions/chooser_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -7 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/extensions/extension_install_dialog_view.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/extensions/extension_install_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/extensions/extension_popup.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/extensions/extension_popup.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/harmony/harmony_layout_delegate.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/harmony/harmony_layout_delegate.cc
|
View
|
|
1 chunk |
+8 lines, -10 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/harmony/layout_delegate.h
|
View
|
|
1 chunk |
+2 lines, -3 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/harmony/layout_delegate.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/importer/import_lock_dialog_view.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/importer/import_lock_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/page_info/page_info_popup_view.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/page_info/page_info_popup_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/passwords/account_chooser_dialog_view.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/payments/payment_request_dialog_view.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/payments/payment_request_dialog_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
3 comments
|
Download
|
|
M |
chrome/browser/ui/views/profiles/user_manager_view.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/profiles/user_manager_view.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/task_manager_view.h
|
View
|
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/task_manager_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/translate/translate_bubble_view.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/translate/translate_bubble_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/validation_message_bubble_view.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/validation_message_bubble_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/webshare/webshare_target_picker_view.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
1 comment
|
Download
|
|
M |
chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
ui/views/bubble/bubble_dialog_delegate_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
ui/views/bubble/info_bubble.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
ui/views/bubble/info_bubble.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
1 comment
|
Download
|
|
M |
ui/views/bubble/tray_bubble_view.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
1 comment
|
Download
|
|
M |
ui/views/bubble/tray_bubble_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
ui/views/views_delegate.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
ui/views/views_delegate.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
ui/views/widget/root_view_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
ui/views/window/dialog_client_view_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
ui/views/window/dialog_delegate.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
1 comment
|
Download
|
|
M |
ui/views/window/dialog_delegate.cc
|
View
|
|
2 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
|
M |
ui/views/window/dialog_delegate_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
Total messages: 8 (6 generated)
|