Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed)

Created:
6 years, 11 months ago by Elliot Glaysher
Modified:
6 years, 11 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, alicet1, sadrul, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, benquan, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, msw+watch_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, rouslan+autofillwatch_chromium.org, kalyank, ben+views_chromium.org, James Su, Ilya Sherman, ben+ash_chromium.org
Visibility:
Public.

Description

views: Make View::set_border() take a scoped_ptr<>. This makes the ownership situation much clearer. It also renames the function to SetBorder() (since it is not a simple accessor and can free previous instances of Border), and creates a Border::NullBorder() method (since "SetBorder(scoped_ptr<>())" is not clear). BUG=none R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246990

Patch Set 1 #

Patch Set 2 : Further renaming #

Patch Set 3 : Further renaming #

Total comments: 5

Patch Set 4 : git cl format #

Patch Set 5 : Remove ClearBorder() #

Patch Set 6 : Remove ClearBorder() #

Total comments: 1

Patch Set 7 : Fix win compile #

Patch Set 8 : Rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+516 lines, -466 lines) Patch
M ash/ime/candidate_view.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M ash/ime/candidate_window_view.cc View 1 2 3 7 chunks +15 lines, -12 lines 0 comments Download
M ash/ime/infolist_window.cc View 1 2 3 6 chunks +12 lines, -11 lines 0 comments Download
M ash/shelf/shelf_view.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ash/system/chromeos/audio/tray_audio.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M ash/system/chromeos/label_tray_view.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M ash/system/chromeos/network/network_state_list_detailed_view.cc View 1 2 3 3 chunks +8 lines, -7 lines 0 comments Download
M ash/system/date/date_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/date/date_view.cc View 1 2 3 4 3 chunks +10 lines, -9 lines 0 comments Download
M ash/system/date/tray_date.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M ash/system/ime/tray_ime.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ash/system/logout_button/logout_button_tray.cc View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M ash/system/logout_button/logout_confirmation_dialog_view.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M ash/system/session_length_limit/tray_session_length_limit.cc View 1 2 3 4 3 chunks +10 lines, -7 lines 0 comments Download
M ash/system/tray/hover_highlight_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/special_popup_row.cc View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M ash/system/tray/system_tray_bubble.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_background_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_background_view.cc View 1 2 3 5 chunks +12 lines, -14 lines 0 comments Download
M ash/system/tray/tray_details_view.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_details_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_empty.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_popup_label_button.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_utils.cc View 1 2 3 2 chunks +12 lines, -8 lines 0 comments Download
M ash/system/user/tray_user.cc View 1 2 3 4 11 chunks +36 lines, -29 lines 0 comments Download
M ash/system/web_notification/web_notification_tray.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/caption_buttons/maximize_bubble_controller_bubble.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/wm/caption_buttons/maximize_bubble_controller_bubble.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/attestation/platform_verification_dialog.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/power/idle_action_warning_dialog_view.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/ui/echo_dialog_view.cc View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_border.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_border.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_ui.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_ui.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 4 9 chunks +17 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_popup_base_view.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/autofill/decorated_textfield.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/autofill/info_bubble.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/avatar_label.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc View 1 2 3 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/collected_cookies_views.cc View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/cookie_info_view.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/dropdown_bar_view.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/dropdown_bar_view.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc View 1 2 3 4 chunks +13 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/find_bar_view.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/fullscreen_exit_bubble_views.cc View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/message_center/message_center_frame_view.cc View 1 2 3 4 5 6 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/new_avatar_button.cc View 1 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/notifications/balloon_view_views.cc View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/password_generation_bubble_view.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc View 1 2 3 3 chunks +28 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/profile_chooser_view.cc View 1 2 3 4 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/profile_reset_bubble_view.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/screen_capture_notification_ui_views.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/speech_recognition_bubble_views.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc View 1 2 3 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/toolbar/back_button.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_action_view.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/browser_actions_container.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/wrench_menu.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M ui/app_list/views/apps_grid_view.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M ui/app_list/views/folder_header_view.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ui/app_list/views/search_box_view.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M ui/app_list/views/search_result_actions_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/views/speech_view.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M ui/message_center/views/message_center_view.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M ui/message_center/views/message_view.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M ui/message_center/views/notification_button.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ui/message_center/views/notification_view.cc View 1 2 3 11 chunks +18 lines, -13 lines 0 comments Download
M ui/message_center/views/notifier_settings_view.cc View 1 2 3 5 chunks +14 lines, -13 lines 0 comments Download
M ui/views/border.h View 1 2 3 4 5 6 3 chunks +17 lines, -10 lines 0 comments Download
M ui/views/border.cc View 1 2 3 4 1 chunk +22 lines, -13 lines 0 comments Download
M ui/views/bubble/bubble_delegate.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/bubble/bubble_frame_view.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/bubble/bubble_frame_view.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M ui/views/bubble/bubble_frame_view_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/bubble/tray_bubble_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/color_chooser/color_chooser_view.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/controls/button/blue_button.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/controls/button/checkbox.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/button/image_button_unittest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M ui/views/controls/button/label_button.h View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M ui/views/controls/button/text_button.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/label_unittest.cc View 1 2 3 6 chunks +12 lines, -24 lines 0 comments Download
M ui/views/controls/menu/menu_scroll_view_container.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_scroll_view_container.cc View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M ui/views/controls/scroll_view.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M ui/views/controls/styled_label_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/views/corewm/tooltip_aura.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/examples/button_example.cc View 1 2 3 1 chunk +7 lines, -4 lines 0 comments Download
M ui/views/examples/label_example.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/multiline_example.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/examples/text_example.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/focus/focus_traversal_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M ui/views/linux_ui/linux_ui.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/touchui/touch_editing_menu.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/view.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/views/view.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M ui/views/window/dialog_delegate.cc View 1 2 3 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Elliot Glaysher
Touches 112 files in the end. (Though the renaming of methods probably exasperated that.)
6 years, 11 months ago (2014-01-23 02:09:08 UTC) #1
sky
https://codereview.chromium.org/145033006/diff/60001/chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc File chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc (right): https://codereview.chromium.org/145033006/diff/60001/chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc#newcode38 chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.cc:38: 0, nit: fix indentation. https://codereview.chromium.org/145033006/diff/60001/chrome/browser/ui/views/message_center/message_center_frame_view.cc File chrome/browser/ui/views/message_center/message_center_frame_view.cc (right): https://codereview.chromium.org/145033006/diff/60001/chrome/browser/ui/views/message_center/message_center_frame_view.cc#newcode22 ...
6 years, 11 months ago (2014-01-23 15:30:52 UTC) #2
Elliot Glaysher
ran "git cl format" on the patch, which I just realized was pushed out to ...
6 years, 11 months ago (2014-01-23 18:55:25 UTC) #3
sky
+ben for a third opinion. Elliot wants to add a ClearBorder() function, which is the ...
6 years, 11 months ago (2014-01-23 19:39:34 UTC) #4
Ben Goodger (Google)
I am also against ClearBorder. How about defining a static on views::Border that returns a ...
6 years, 11 months ago (2014-01-23 22:26:10 UTC) #5
Elliot Glaysher
ptal Moved to SetBorder(views::Border::NullBorder());
6 years, 11 months ago (2014-01-24 01:50:38 UTC) #6
sky
LGTM https://codereview.chromium.org/145033006/diff/240001/ui/views/border.h File ui/views/border.h (right): https://codereview.chromium.org/145033006/diff/240001/ui/views/border.h#newcode47 ui/views/border.h:47: // Documents that you are not drawing a ...
6 years, 11 months ago (2014-01-24 16:33:46 UTC) #7
Elliot Glaysher
6 years, 11 months ago (2014-01-24 22:49:49 UTC) #8
Message was sent while issue was closed.
Committed patchset #8 manually as r246990 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698