summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 22:51:46 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 22:51:46 +0000
commita852203c1ae878c97ef5f64eec9b89e57642a78b (patch)
tree8d2e4837f0bd6f9300a0fe2d17c0956181e39bbf
parentdd9cd303480e5c1fd2465986903856651bded8d5 (diff)
downloadchromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.zip
chromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.tar.gz
chromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.tar.bz2
mac: Update clients of scoped_nsobject.h.
1.) The header is now in base/mac instead of base/memory 2.) The class is now in namespace base. This CL was created programmatically by running: 1.) git grep -l memory/scoped_nsobject.h | xargs sed -i -e 's/memory\/scoped_nsobject.h/mac\/scoped_nsobject.h/g' for f in $(git diff --name-only origin); do tools/sort-headers.py $f -f; done git commit -a -m headers # manually undo changes to gypi file git cl upload # patch set 1 2.) git grep -l 'scoped_nsobject<' | xargs sed -i -e 's/scoped_nsobject</base::scoped_nsobject</g' # manually undo comment changes in scoped_nsobject.h, tracking_area.h git commit -a -m format git cl upload # patch set 2 # Manually audit all files, file bugs and clean up bad clang-format decisions git cl upload # patch set 3 BUG=251957 TBR=mark@chromium.org Review URL: https://codereview.chromium.org/17593006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208283 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/shell/shell_main_parts_mac.mm8
-rw-r--r--ash/test/test_suite_init.mm2
-rw-r--r--base/file_version_info_mac.h4
-rw-r--r--base/mac/mac_util.mm16
-rw-r--r--base/mac/mac_util_unittest.mm7
-rw-r--r--base/mac/scoped_sending_event.h2
-rw-r--r--base/test/test_support_ios.mm4
-rw-r--r--chrome/app/chrome_main_app_mode_mac.mm4
-rw-r--r--chrome/browser/app_controller_mac.h4
-rw-r--r--chrome/browser/app_controller_mac.mm13
-rw-r--r--chrome/browser/app_controller_mac_browsertest.mm6
-rw-r--r--chrome/browser/app_controller_mac_unittest.mm4
-rw-r--r--chrome/browser/chrome_browser_application_mac.h2
-rw-r--r--chrome/browser/chrome_browser_application_mac.mm2
-rw-r--r--chrome/browser/chrome_browser_main_mac.mm8
-rw-r--r--chrome/browser/download/download_status_updater_mac.mm8
-rw-r--r--chrome/browser/importer/safari_importer.mm2
-rw-r--r--chrome/browser/mac/keystone_glue.h4
-rw-r--r--chrome/browser/mac/keystone_glue.mm4
-rw-r--r--chrome/browser/media_galleries/fileapi/itunes_finder_mac.mm6
-rw-r--r--chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm4
-rw-r--r--chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm10
-rw-r--r--chrome/browser/notifications/notification_ui_manager_mac.h4
-rw-r--r--chrome/browser/speech/tts_mac.mm8
-rw-r--r--chrome/browser/ssl/ssl_add_cert_handler_mac.mm2
-rw-r--r--chrome/browser/storage_monitor/image_capture_device.h4
-rw-r--r--chrome/browser/storage_monitor/image_capture_device_manager.h4
-rw-r--r--chrome/browser/storage_monitor/image_capture_device_manager.mm4
-rw-r--r--chrome/browser/storage_monitor/image_capture_device_manager_unittest.mm46
-rw-r--r--chrome/browser/ui/app_list/app_list_service_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/animatable_image.h4
-rw-r--r--chrome/browser/ui/cocoa/animatable_view.h4
-rw-r--r--chrome/browser/ui/cocoa/animatable_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h9
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm6
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_unittest.mm22
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_item_applescript_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm8
-rw-r--r--chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm4
-rw-r--r--chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm7
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm8
-rw-r--r--chrome/browser/ui/cocoa/applescript/window_applescript.mm8
-rw-r--r--chrome/browser/ui/cocoa/applescript/window_applescript_test.mm40
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h8
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm12
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_details_container.h5
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_details_container.mm2
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h10
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm10
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_main_container.h6
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_main_container.mm6
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h2
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_section_container.h15
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_section_container.mm10
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_section_container_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_section_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h10
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm10
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_textfield.h4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_textfield_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm9
-rw-r--r--chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/autofill/simple_grid_layout_unittest.mm44
-rw-r--r--chrome/browser/ui/cocoa/background_gradient_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm18
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h19
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm35
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm14
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h12
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm42
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm18
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm33
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm9
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm8
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm41
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm24
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm12
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm66
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.mm9
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm26
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm23
-rw-r--r--chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm19
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm13
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.h31
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_private.mm9
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_unittest.mm14
-rw-r--r--chrome/browser/ui/cocoa/bubble_view.h4
-rw-r--r--chrome/browser/ui/cocoa/bubble_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/bubble_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/certificate_viewer_mac.h8
-rw-r--r--chrome/browser/ui/cocoa/certificate_viewer_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/chrome_event_processing_window.h2
-rw-r--r--chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/clickhold_button_cell.h2
-rw-r--r--chrome/browser/ui/cocoa/clickhold_button_cell_unittest.mm7
-rw-r--r--chrome/browser/ui/cocoa/color_chooser_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/command_observer_bridge_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/confirm_bubble_cocoa.h12
-rw-r--r--chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm6
-rw-r--r--chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm18
-rw-r--r--chrome/browser/ui/cocoa/confirm_quit_panel_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm9
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h14
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm2
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_alert_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_animation_unittest.mm12
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm6
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.mm4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm6
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.mm4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h4
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm6
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm11
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm35
-rw-r--r--chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h8
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h14
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm10
-rw-r--r--chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details.h32
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm18
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h8
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_tree_node.mm2
-rw-r--r--chrome/browser/ui/cocoa/custom_frame_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/dev_tools_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/dev_tools_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/dock_icon.mm17
-rw-r--r--chrome/browser/ui/cocoa/download/background_theme.h8
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_button.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_button_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.h10
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm32
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_view_unittest.mm5
-rw-r--r--chrome/browser/ui/cocoa/draggable_button.h4
-rw-r--r--chrome/browser/ui/cocoa/draggable_button.mm2
-rw-r--r--chrome/browser/ui/cocoa/draggable_button_mixin.mm2
-rw-r--r--chrome/browser/ui/cocoa/draggable_button_unittest.mm17
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_action_button.h4
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_actions_controller.h12
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm6
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm7
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm4
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm77
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_popup_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm11
-rw-r--r--chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h10
-rw-r--r--chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm20
-rw-r--r--chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm6
-rw-r--r--chrome/browser/ui/cocoa/fast_resize_view_unittest.mm9
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.mm2
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell_unittest.mm12
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_view_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/find_pasteboard_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/first_run_bubble_controller_unittest.mm12
-rw-r--r--chrome/browser/ui/cocoa/first_run_dialog.mm4
-rw-r--r--chrome/browser/ui/cocoa/floating_bar_backing_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/framed_browser_window.h2
-rw-r--r--chrome/browser/ui/cocoa/framed_browser_window_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_window_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/global_error_bubble_controller.mm8
-rw-r--r--chrome/browser/ui/cocoa/gradient_button_cell.h8
-rw-r--r--chrome/browser/ui/cocoa/gradient_button_cell.mm8
-rw-r--r--chrome/browser/ui/cocoa/gradient_button_cell_unittest.mm11
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.h10
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_overlay_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/history_overlay_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/hover_close_button.mm2
-rw-r--r--chrome/browser/ui/cocoa/hover_close_button_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell.mm6
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm12
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_text_view.mm9
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/image_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/image_button_cell_unittest.mm7
-rw-r--r--chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_view.h4
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_window.mm4
-rw-r--r--chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm6
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/infobars/infobar_utilities.mm10
-rw-r--r--chrome/browser/ui/cocoa/infobars/translate_infobar_base.h18
-rw-r--r--chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm10
-rw-r--r--chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.mm13
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h12
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h6
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm11
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm19
-rw-r--r--chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/bubble_decoration.h12
-rw-r--r--chrome/browser/ui/cocoa/location_bar/button_decoration.h8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h10
-rw-r--r--chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm6
-rw-r--r--chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration_unittest.mm3
-rw-r--r--chrome/browser/ui/cocoa/location_bar/image_decoration.h4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h10
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/page_action_decoration.h4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/plus_decoration.h4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h6
-rw-r--r--chrome/browser/ui/cocoa/location_bar/star_decoration.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/zoom_decoration.h2
-rw-r--r--chrome/browser/ui/cocoa/login_prompt_cocoa.mm6
-rw-r--r--chrome/browser/ui/cocoa/menu_button.h6
-rw-r--r--chrome/browser/ui/cocoa/menu_button.mm2
-rw-r--r--chrome/browser/ui/cocoa/menu_button_unittest.mm22
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h8
-rw-r--r--chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/nsmenuitem_additions_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/nsview_additions_unittest.mm28
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h6
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm8
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_bubble_controller_browsertest.mm2
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_bubble_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm7
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_view_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h7
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h6
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h6
-rw-r--r--chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm12
-rw-r--r--chrome/browser/ui/cocoa/presentation_mode_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/profile_menu_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/profile_menu_controller.mm7
-rw-r--r--chrome/browser/ui/cocoa/profile_menu_controller_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.mm10
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h18
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm6
-rw-r--r--chrome/browser/ui/cocoa/run_loop_testing.mm4
-rw-r--r--chrome/browser/ui/cocoa/run_loop_testing_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h6
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/status_icons/status_icon_mac.h10
-rw-r--r--chrome/browser/ui/cocoa/styled_text_field_cell_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/styled_text_field_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm3
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h4
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h6
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h4
-rw-r--r--chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/table_row_nsimage_cache.h4
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.h8
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.mm14
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_controller.mm8
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm32
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm20
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.h25
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm16
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm17
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_view.h6
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_view.h6
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_window_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbber_view.h2
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbber_view.mm6
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbber_view_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbbing_image_view.h6
-rw-r--r--chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm16
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.h6
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.mm13
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_button_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.h15
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm15
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm20
-rw-r--r--chrome/browser/ui/cocoa/validation_message_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/vertical_gradient_view.h6
-rw-r--r--chrome/browser/ui/cocoa/vertical_gradient_view_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/web_dialog_window_controller.mm12
-rw-r--r--chrome/browser/ui/cocoa/website_settings_bubble_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/website_settings_bubble_controller.mm43
-rw-r--r--chrome/browser/ui/cocoa/window_size_autosaver.h3
-rw-r--r--chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm42
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/recent_tabs_menu_model_delegate.h4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm12
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm6
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.mm4
-rw-r--r--chrome/browser/ui/webui/help/version_updater_mac.h4
-rw-r--r--chrome/browser/web_applications/web_app_mac.mm2
-rw-r--r--chrome/browser/web_applications/web_app_mac_unittest.mm8
-rw-r--r--chrome/common/mac/cfbundle_blocker.mm4
-rw-r--r--chrome/common/mac/nscoder_util_unittest.mm10
-rw-r--r--chrome/common/mac/objc_method_swizzle.mm2
-rw-r--r--chrome/common/mac/objc_method_swizzle_unittest.mm4
-rw-r--r--chrome/common/mac/objc_zombie_unittest.mm12
-rw-r--r--chrome/common/service_process_util_mac.mm15
-rw-r--r--content/browser/accessibility/browser_accessibility_cocoa.h6
-rw-r--r--content/browser/accessibility/browser_accessibility_mac.h2
-rw-r--r--content/browser/accessibility/browser_accessibility_mac_unittest.mm4
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm6
-rw-r--r--content/browser/geolocation/core_location_data_provider_mac.h4
-rw-r--r--content/browser/geolocation/wifi_data_provider_corewlan_mac.mm6
-rw-r--r--content/browser/renderer_host/clipboard_message_filter_mac.mm3
-rw-r--r--content/browser/renderer_host/compositing_iosurface_context_mac.h4
-rw-r--r--content/browser/renderer_host/compositing_iosurface_context_mac.mm8
-rw-r--r--content/browser/renderer_host/popup_menu_helper_mac.mm18
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.h18
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm8
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac_unittest.mm14
-rw-r--r--content/browser/renderer_host/text_input_client_mac.h4
-rw-r--r--content/browser/renderer_host/text_input_client_mac_unittest.mm2
-rw-r--r--content/browser/renderer_host/text_input_client_message_filter.mm2
-rw-r--r--content/browser/renderer_host/webmenurunner_mac.h4
-rw-r--r--content/browser/renderer_host/webmenurunner_mac.mm20
-rw-r--r--content/browser/web_contents/web_contents_view_mac.h10
-rw-r--r--content/browser/web_contents/web_contents_view_mac_unittest.mm8
-rw-r--r--content/browser/web_contents/web_drag_dest_mac_unittest.mm6
-rw-r--r--content/browser/web_contents/web_drag_source_mac.h6
-rw-r--r--content/browser/web_contents/web_drag_source_mac_unittest.mm21
-rw-r--r--content/common/mac/attributed_string_coder.mm4
-rw-r--r--content/common/mac/attributed_string_coder_unittest.mm14
-rw-r--r--content/common/mac/font_loader.mm4
-rw-r--r--content/common/sandbox_mac.mm6
-rw-r--r--content/shell/shell_browser_main_parts_mac.mm8
-rw-r--r--content/shell/shell_javascript_dialog_mac.mm4
-rw-r--r--content/shell/shell_login_dialog_mac.mm4
-rw-r--r--content/shell/shell_mac.mm7
-rw-r--r--crypto/apple_keychain_ios.mm10
-rw-r--r--net/base/platform_mime_util_mac.mm2
-rw-r--r--printing/printing_context_mac.h6
-rw-r--r--remoting/host/continue_window_mac.mm10
-rw-r--r--rlz/mac/lib/rlz_value_store_mac.h8
-rw-r--r--skia/ext/skia_utils_mac.mm6
-rw-r--r--skia/ext/skia_utils_mac_unittest.mm4
-rw-r--r--ui/app_list/cocoa/app_list_view_controller.h13
-rw-r--r--ui/app_list/cocoa/app_list_view_controller.mm4
-rw-r--r--ui/app_list/cocoa/app_list_view_controller_unittest.mm4
-rw-r--r--ui/app_list/cocoa/app_list_window_controller.h4
-rw-r--r--ui/app_list/cocoa/app_list_window_controller.mm2
-rw-r--r--ui/app_list/cocoa/app_list_window_controller_unittest.mm4
-rw-r--r--ui/app_list/cocoa/apps_collection_view_drag_manager.h4
-rw-r--r--ui/app_list/cocoa/apps_collection_view_drag_manager.mm4
-rw-r--r--ui/app_list/cocoa/apps_grid_controller.h10
-rw-r--r--ui/app_list/cocoa/apps_grid_controller.mm7
-rw-r--r--ui/app_list/cocoa/apps_grid_controller_unittest.mm10
-rw-r--r--ui/app_list/cocoa/apps_grid_view_item.mm20
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller.h10
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller.mm5
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller_unittest.mm8
-rw-r--r--ui/app_list/cocoa/apps_search_results_controller.h4
-rw-r--r--ui/app_list/cocoa/apps_search_results_controller.mm27
-rw-r--r--ui/app_list/cocoa/apps_search_results_controller_unittest.mm7
-rw-r--r--ui/app_list/cocoa/apps_search_results_model_bridge.h4
-rw-r--r--ui/app_list/cocoa/current_user_menu_item_view.mm6
-rw-r--r--ui/app_list/cocoa/item_drag_controller.h6
-rw-r--r--ui/app_list/cocoa/item_drag_controller.mm7
-rw-r--r--ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm4
-rw-r--r--ui/aura/root_window_host_mac.mm4
-rw-r--r--ui/base/accelerators/platform_accelerator_cocoa.h4
-rw-r--r--ui/base/clipboard/clipboard_mac.mm8
-rw-r--r--ui/base/cocoa/base_view.h6
-rw-r--r--ui/base/cocoa/base_view_unittest.mm5
-rw-r--r--ui/base/cocoa/controls/hover_image_menu_button_cell.h4
-rw-r--r--ui/base/cocoa/controls/hover_image_menu_button_cell.mm2
-rw-r--r--ui/base/cocoa/controls/hover_image_menu_button_unittest.mm8
-rw-r--r--ui/base/cocoa/find_pasteboard.h4
-rw-r--r--ui/base/cocoa/focus_tracker.h4
-rw-r--r--ui/base/cocoa/focus_tracker_unittest.mm21
-rw-r--r--ui/base/cocoa/fullscreen_window_manager.h6
-rw-r--r--ui/base/cocoa/fullscreen_window_manager_unittest.mm7
-rw-r--r--ui/base/cocoa/hover_button.h2
-rw-r--r--ui/base/cocoa/hover_button.mm2
-rw-r--r--ui/base/cocoa/hover_image_button.h8
-rw-r--r--ui/base/cocoa/hover_image_button_unittest.mm4
-rw-r--r--ui/base/cocoa/menu_controller.h4
-rw-r--r--ui/base/cocoa/menu_controller.mm6
-rw-r--r--ui/base/cocoa/menu_controller_unittest.mm22
-rw-r--r--ui/base/cocoa/nib_loading.mm4
-rw-r--r--ui/base/cocoa/nsgraphics_context_additions_unittest.mm4
-rw-r--r--ui/base/cocoa/tracking_area.h6
-rw-r--r--ui/base/cocoa/tracking_area.mm2
-rw-r--r--ui/base/cocoa/tracking_area_unittest.mm6
-rw-r--r--ui/base/cocoa/underlay_opengl_hosting_window.mm18
-rw-r--r--ui/base/resource/resource_bundle_ios.mm8
-rw-r--r--ui/base/resource/resource_bundle_mac.mm9
-rw-r--r--ui/base/test/ui_cocoa_test_helper.h16
-rw-r--r--ui/compositor/test/test_compositor_host_mac.mm5
-rw-r--r--ui/gfx/image/image_ios.mm8
-rw-r--r--ui/gfx/image/image_mac.mm12
-rw-r--r--ui/gfx/image/image_mac_unittest.mm6
-rw-r--r--ui/gfx/image/image_skia_util_mac.mm6
-rw-r--r--ui/gfx/platform_font_mac.mm4
-rw-r--r--ui/gl/gl_context_nsview.h4
-rw-r--r--ui/gl/gl_context_nsview.mm2
-rw-r--r--ui/message_center/cocoa/notification_controller.h14
-rw-r--r--ui/message_center/cocoa/notification_controller.mm17
-rw-r--r--ui/message_center/cocoa/notification_controller_unittest.mm16
-rw-r--r--ui/message_center/cocoa/popup_collection.h6
-rw-r--r--ui/message_center/cocoa/popup_collection_unittest.mm4
-rw-r--r--ui/message_center/cocoa/popup_controller.h6
-rw-r--r--ui/message_center/cocoa/popup_controller.mm10
-rw-r--r--ui/message_center/cocoa/popup_controller_unittest.mm4
-rw-r--r--ui/message_center/cocoa/settings_controller.h8
-rw-r--r--ui/message_center/cocoa/settings_controller.mm15
-rw-r--r--ui/message_center/cocoa/settings_controller_unittest.mm4
-rw-r--r--ui/message_center/cocoa/status_item_view.h4
-rw-r--r--ui/message_center/cocoa/status_item_view_unittest.mm4
-rw-r--r--ui/message_center/cocoa/tray_controller.h4
-rw-r--r--ui/message_center/cocoa/tray_controller.mm2
-rw-r--r--ui/message_center/cocoa/tray_controller_unittest.mm4
-rw-r--r--ui/message_center/cocoa/tray_view_controller.h26
-rw-r--r--ui/message_center/cocoa/tray_view_controller.mm16
-rw-r--r--ui/message_center/cocoa/tray_view_controller_unittest.mm4
-rw-r--r--ui/shell_dialogs/select_file_dialog_mac.mm4
-rw-r--r--ui/snapshot/snapshot_mac.mm4
-rw-r--r--ui/snapshot/snapshot_mac_unittest.mm6
-rw-r--r--webkit/common/cursors/webcursor_mac.mm4
-rw-r--r--webkit/common/user_agent/user_agent_util_ios.mm4
544 files changed, 2124 insertions, 2091 deletions
diff --git a/ash/shell/shell_main_parts_mac.mm b/ash/shell/shell_main_parts_mac.mm
index d5c726e..292e1d5 100644
--- a/ash/shell/shell_main_parts_mac.mm
+++ b/ash/shell/shell_main_parts_mac.mm
@@ -8,7 +8,7 @@
#include "base/i18n/icu_util.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
@@ -20,9 +20,9 @@ void PreMainMessageLoopStart() {
icu_util::Initialize();
ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
- scoped_nsobject<NSNib>
- nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
- bundle:base::mac::FrameworkBundle()]);
+ base::scoped_nsobject<NSNib> nib(
+ [[NSNib alloc] initWithNibNamed:@"MainMenu"
+ bundle:base::mac::FrameworkBundle()]);
[nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
}
diff --git a/ash/test/test_suite_init.mm b/ash/test/test_suite_init.mm
index 1564c38..0c8fd4a 100644
--- a/ash/test/test_suite_init.mm
+++ b/ash/test/test_suite_init.mm
@@ -8,7 +8,7 @@
#include "base/files/file_path.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/path_service.h"
namespace ash {
diff --git a/base/file_version_info_mac.h b/base/file_version_info_mac.h
index 0ab3296..f488cce 100644
--- a/base/file_version_info_mac.h
+++ b/base/file_version_info_mac.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/file_version_info.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#ifdef __OBJC__
@class NSBundle;
@@ -45,7 +45,7 @@ class FileVersionInfoMac : public FileVersionInfo {
// Returns the empty string if the property does not exist.
string16 GetString16Value(CFStringRef name);
- scoped_nsobject<NSBundle> bundle_;
+ base::scoped_nsobject<NSBundle> bundle_;
DISALLOW_COPY_AND_ASSIGN(FileVersionInfoMac);
};
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index e924f90..04311ec 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -19,7 +19,7 @@
#include "base/mac/mac_logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/sys_string_conversions.h"
@@ -99,7 +99,7 @@ LSSharedFileListItemRef GetLoginItemForApp() {
return NULL;
}
- scoped_nsobject<NSArray> login_items_array(
+ base::scoped_nsobject<NSArray> login_items_array(
CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL)));
NSURL* url = [NSURL fileURLWithPath:[base::mac::MainBundle() bundlePath]];
@@ -489,17 +489,17 @@ void RemoveFromLoginItems() {
bool WasLaunchedAsLoginOrResumeItem() {
ProcessSerialNumber psn = { 0, kCurrentProcess };
- scoped_nsobject<NSDictionary> process_info(
- CFToNSCast(ProcessInformationCopyDictionary(&psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ base::scoped_nsobject<NSDictionary> process_info(
+ CFToNSCast(ProcessInformationCopyDictionary(
+ &psn, kProcessDictionaryIncludeAllInformationMask)));
long long temp = [[process_info objectForKey:@"ParentPSN"] longLongValue];
ProcessSerialNumber parent_psn =
{ (temp >> 32) & 0x00000000FFFFFFFFLL, temp & 0x00000000FFFFFFFFLL };
- scoped_nsobject<NSDictionary> parent_info(
- CFToNSCast(ProcessInformationCopyDictionary(&parent_psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ base::scoped_nsobject<NSDictionary> parent_info(
+ CFToNSCast(ProcessInformationCopyDictionary(
+ &parent_psn, kProcessDictionaryIncludeAllInformationMask)));
// Check that creator process code is that of loginwindow.
BOOL result =
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index 44cc5ec..0e52cbc 100644
--- a/base/mac/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -11,7 +11,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/sys_info.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -125,7 +125,7 @@ TEST_F(MacUtilTest, TestExcludeFileFromBackups) {
}
TEST_F(MacUtilTest, CopyNSImageToCGImage) {
- scoped_nsobject<NSImage> nsImage(
+ base::scoped_nsobject<NSImage> nsImage(
[[NSImage alloc] initWithSize:NSMakeSize(20, 20)]);
[nsImage lockFocus];
[[NSColor redColor] set];
@@ -139,7 +139,8 @@ TEST_F(MacUtilTest, CopyNSImageToCGImage) {
}
TEST_F(MacUtilTest, NSObjectRetainRelease) {
- scoped_nsobject<NSArray> array([[NSArray alloc] initWithObjects:@"foo", nil]);
+ base::scoped_nsobject<NSArray> array(
+ [[NSArray alloc] initWithObjects:@"foo", nil]);
EXPECT_EQ(1U, [array retainCount]);
NSObjectRetain(array);
diff --git a/base/mac/scoped_sending_event.h b/base/mac/scoped_sending_event.h
index 62bb31f..75cfec8 100644
--- a/base/mac/scoped_sending_event.h
+++ b/base/mac/scoped_sending_event.h
@@ -7,7 +7,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_pump_mac.h"
// Nested event loops can pump IPC messages, including
diff --git a/base/test/test_support_ios.mm b/base/test/test_support_ios.mm
index ebe6767..198b134 100644
--- a/base/test/test_support_ios.mm
+++ b/base/test/test_support_ios.mm
@@ -7,7 +7,7 @@
#include "base/debug/debugger.h"
#include "base/logging.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_default.h"
#include "base/test/test_suite.h"
@@ -36,7 +36,7 @@ static char** g_argv;
@interface ChromeUnitTestDelegate : NSObject {
@private
- scoped_nsobject<UIWindow> window_;
+ base::scoped_nsobject<UIWindow> window_;
}
- (void)runTests;
@end
diff --git a/chrome/app/chrome_main_app_mode_mac.mm b/chrome/app/chrome_main_app_mode_mac.mm
index 0f0af85..149b402 100644
--- a/chrome/app/chrome_main_app_mode_mac.mm
+++ b/chrome/app/chrome_main_app_mode_mac.mm
@@ -17,7 +17,7 @@
#include "base/mac/mac_logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/strings/sys_string_conversions.h"
@@ -81,7 +81,7 @@ class AppShimController : public IPC::Listener {
void Close();
IPC::ChannelProxy* channel_;
- scoped_nsobject<AppShimDelegate> nsapp_delegate_;
+ base::scoped_nsobject<AppShimDelegate> nsapp_delegate_;
DISALLOW_COPY_AND_ASSIGN(AppShimController);
};
diff --git a/chrome/browser/app_controller_mac.h b/chrome/browser/app_controller_mac.h
index cea9bfd..5928e17 100644
--- a/chrome/browser/app_controller_mac.h
+++ b/chrome/browser/app_controller_mac.h
@@ -10,7 +10,7 @@
#import <Cocoa/Cocoa.h>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
@@ -46,7 +46,7 @@ class WorkAreaWatcherObserver;
// The profile menu, which appears right before the Help menu. It is only
// available when multiple profiles is enabled.
- scoped_nsobject<ProfileMenuController> profileMenuController_;
+ base::scoped_nsobject<ProfileMenuController> profileMenuController_;
// If we're told to open URLs (in particular, via |-application:openFiles:| by
// Launch Services) before we've launched the browser, we queue them up in
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 9ceb463..b826354 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1226,7 +1226,7 @@ void RecordLastRunAppBundlePath() {
[dockMenu addItem:[NSMenuItem separatorItem]];
NSString* titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_WINDOW_MAC);
- scoped_nsobject<NSMenuItem> item(
+ base::scoped_nsobject<NSMenuItem> item(
[[NSMenuItem alloc] initWithTitle:titleStr
action:@selector(commandFromDock:)
keyEquivalent:@""]);
@@ -1255,7 +1255,8 @@ void RecordLastRunAppBundlePath() {
int position = 0;
NSString* menuStr =
l10n_util::GetNSStringWithFixup(IDS_BACKGROUND_APPS_MAC);
- scoped_nsobject<NSMenu> appMenu([[NSMenu alloc] initWithTitle:menuStr]);
+ base::scoped_nsobject<NSMenu> appMenu(
+ [[NSMenu alloc] initWithTitle:menuStr]);
for (extensions::ExtensionList::const_iterator cursor =
applications.begin();
cursor != applications.end();
@@ -1263,10 +1264,10 @@ void RecordLastRunAppBundlePath() {
DCHECK_EQ(applications.GetPosition(*cursor), position);
NSString* itemStr =
base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name()));
- scoped_nsobject<NSMenuItem> appItem([[NSMenuItem alloc]
- initWithTitle:itemStr
- action:@selector(executeApplication:)
- keyEquivalent:@""]);
+ base::scoped_nsobject<NSMenuItem> appItem(
+ [[NSMenuItem alloc] initWithTitle:itemStr
+ action:@selector(executeApplication:)
+ keyEquivalent:@""]);
[appItem setTarget:self];
[appItem setTag:position];
[appMenu addItem:appItem];
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm
index 62d2680..a0d199e 100644
--- a/chrome/browser/app_controller_mac_browsertest.mm
+++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/command_line.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/ui/browser.h"
@@ -39,7 +39,7 @@ class AppControllerPlatformAppBrowserTest : public InProcessBrowserTest {
// open then a reopen event does nothing.
IN_PROC_BROWSER_TEST_F(AppControllerPlatformAppBrowserTest,
PlatformAppReopenWithWindows) {
- scoped_nsobject<AppController> ac([[AppController alloc] init]);
+ base::scoped_nsobject<AppController> ac([[AppController alloc] init]);
NSUInteger old_window_count = [[NSApp windows] count];
EXPECT_EQ(1u, native_browser_list->size());
BOOL result = [ac applicationShouldHandleReopen:NSApp hasVisibleWindows:YES];
@@ -71,7 +71,7 @@ class AppControllerWebAppBrowserTest : public InProcessBrowserTest {
// Test that in web app mode a reopen event opens the app URL.
IN_PROC_BROWSER_TEST_F(AppControllerWebAppBrowserTest,
WebAppReopenWithNoWindows) {
- scoped_nsobject<AppController> ac([[AppController alloc] init]);
+ base::scoped_nsobject<AppController> ac([[AppController alloc] init]);
EXPECT_EQ(1u, native_browser_list->size());
BOOL result = [ac applicationShouldHandleReopen:NSApp hasVisibleWindows:NO];
diff --git a/chrome/browser/app_controller_mac_unittest.mm b/chrome/browser/app_controller_mac_unittest.mm
index b391fd7..a17c76d 100644
--- a/chrome/browser/app_controller_mac_unittest.mm
+++ b/chrome/browser/app_controller_mac_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/app_controller_mac.h"
#include "testing/platform_test.h"
@@ -13,7 +13,7 @@ class AppControllerTest : public PlatformTest {
};
TEST_F(AppControllerTest, DockMenu) {
- scoped_nsobject<AppController> ac([[AppController alloc] init]);
+ base::scoped_nsobject<AppController> ac([[AppController alloc] init]);
NSMenu* menu = [ac applicationDockMenu:NSApp];
NSMenuItem* item;
diff --git a/chrome/browser/chrome_browser_application_mac.h b/chrome/browser/chrome_browser_application_mac.h
index 5363942..5bcfc15 100644
--- a/chrome/browser/chrome_browser_application_mac.h
+++ b/chrome/browser/chrome_browser_application_mac.h
@@ -11,8 +11,8 @@
#include <vector>
+#import "base/mac/scoped_nsobject.h"
#import "base/mac/scoped_sending_event.h"
-#import "base/memory/scoped_nsobject.h"
#import "base/message_loop/message_pump_mac.h"
#include "base/synchronization/lock.h"
diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
index 74dd296..2889a64 100644
--- a/chrome/browser/chrome_browser_application_mac.mm
+++ b/chrome/browser/chrome_browser_application_mac.mm
@@ -9,7 +9,7 @@
#include "base/debug/stack_trace.h"
#import "base/logging.h"
#import "base/mac/scoped_nsexception_enabler.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "base/metrics/histogram.h"
#include "base/strings/stringprintf.h"
#import "base/strings/sys_string_conversions.h"
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm
index b1b4989..156146b 100644
--- a/chrome/browser/chrome_browser_main_mac.mm
+++ b/chrome/browser/chrome_browser_main_mac.mm
@@ -12,7 +12,7 @@
#include "base/files/file_path.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "chrome/app/breakpad_mac.h"
@@ -265,9 +265,9 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
}
// Now load the nib (from the right bundle).
- scoped_nsobject<NSNib>
- nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
- bundle:base::mac::FrameworkBundle()]);
+ base::scoped_nsobject<NSNib> nib(
+ [[NSNib alloc] initWithNibNamed:@"MainMenu"
+ bundle:base::mac::FrameworkBundle()]);
// TODO(viettrungluu): crbug.com/20504 - This currently leaks, so if you
// change this, you'll probably need to change the Valgrind suppression.
[nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
diff --git a/chrome/browser/download/download_status_updater_mac.mm b/chrome/browser/download/download_status_updater_mac.mm
index fbf010e..4ffcd81 100644
--- a/chrome/browser/download/download_status_updater_mac.mm
+++ b/chrome/browser/download/download_status_updater_mac.mm
@@ -5,11 +5,11 @@
#include "chrome/browser/download/download_status_updater.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
-#include "base/supports_user_data.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
-#include "content/public/browser/download_item.h"
+#include "base/supports_user_data.h"
#import "chrome/browser/ui/cocoa/dock_icon.h"
+#include "content/public/browser/download_item.h"
#include "googleurl/src/gurl.h"
// --- Private 10.8 API for showing progress ---
@@ -169,7 +169,7 @@ class CrNSProgressUserData : public base::SupportsUserData::Data {
void setTarget(const base::FilePath& target) { target_ = target; }
private:
- scoped_nsobject<NSProgress> progress_;
+ base::scoped_nsobject<NSProgress> progress_;
base::FilePath target_;
};
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index 422cc68..e1eed6c 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -11,7 +11,7 @@
#include "base/file_util.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/mac/keystone_glue.h b/chrome/browser/mac/keystone_glue.h
index 8b696c2..d85763c 100644
--- a/chrome/browser/mac/keystone_glue.h
+++ b/chrome/browser/mac/keystone_glue.h
@@ -12,7 +12,7 @@
#import <Foundation/Foundation.h>
#include "base/mac/scoped_authorizationref.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
// Possible outcomes of various operations. A version may accompany some of
// these, but beware: a version is never required. For statuses that can be
@@ -89,7 +89,7 @@ enum BrandFileType {
NSTimer* timer_; // strong
// The most recent kAutoupdateStatusNotification notification posted.
- scoped_nsobject<NSNotification> recentNotification_;
+ base::scoped_nsobject<NSNotification> recentNotification_;
// The authorization object, when it needs to persist because it's being
// carried across threads.
diff --git a/chrome/browser/mac/keystone_glue.mm b/chrome/browser/mac/keystone_glue.mm
index 0a97252..f93e86d 100644
--- a/chrome/browser/mac/keystone_glue.mm
+++ b/chrome/browser/mac/keystone_glue.mm
@@ -97,9 +97,9 @@ class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> {
[target_ performSelector:sel_ withObject:arg_];
}
- scoped_nsobject<id> target_;
+ base::scoped_nsobject<id> target_;
SEL sel_;
- scoped_nsobject<id> arg_;
+ base::scoped_nsobject<id> arg_;
};
} // namespace
diff --git a/chrome/browser/media_galleries/fileapi/itunes_finder_mac.mm b/chrome/browser/media_galleries/fileapi/itunes_finder_mac.mm
index 79846ac..fb9fb4e 100644
--- a/chrome/browser/media_galleries/fileapi/itunes_finder_mac.mm
+++ b/chrome/browser/media_galleries/fileapi/itunes_finder_mac.mm
@@ -7,7 +7,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#import "base/mac/foundation_util.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/time.h"
#include "content/public/browser/browser_thread.h"
@@ -28,8 +28,8 @@ void ITunesFinderMac::FindITunesLibraryOnFileThread() {
CFStringRef iapp_id = CFSTR("com.apple.iApps");
CFStringRef itunes_db_key = CFSTR("iTunesRecentDatabasePaths");
- scoped_nsobject<NSArray> plist(CFToNSCast(CFCast<CFArrayRef>(
- CFPreferencesCopyAppValue(itunes_db_key, iapp_id))));
+ base::scoped_nsobject<NSArray> plist(CFToNSCast(
+ CFCast<CFArrayRef>(CFPreferencesCopyAppValue(itunes_db_key, iapp_id))));
if (!plist) {
PostResultToUIThread(std::string());
return;
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
index 7c4447f..87119f1 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/media_galleries/mtp_device_delegate_impl.h"
#include "chrome/browser/storage_monitor/image_capture_device.h"
@@ -61,7 +61,7 @@ class MTPDeviceDelegateImplMac::DeviceListener
virtual void ResetDelegate();
private:
- scoped_nsobject<ImageCaptureDevice> camera_device_;
+ base::scoped_nsobject<ImageCaptureDevice> camera_device_;
// Weak pointer
MTPDeviceDelegateImplMac* delegate_;
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
index c88493b..7e71717 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
@@ -9,7 +9,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/mac/cocoa_protocols.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
@@ -47,7 +47,7 @@ const char kTestFileContents[] = "test";
@interface MockMTPICCameraDevice : ICCameraDevice {
@private
- scoped_nsobject<NSMutableArray> allMediaFiles_;
+ base::scoped_nsobject<NSMutableArray> allMediaFiles_;
}
- (void)addMediaFile:(ICCameraFile*)file;
@@ -121,8 +121,8 @@ const char kTestFileContents[] = "test";
@interface MockMTPICCameraFile : ICCameraFile {
@private
- scoped_nsobject<NSString> name_;
- scoped_nsobject<NSDate> date_;
+ base::scoped_nsobject<NSString> name_;
+ base::scoped_nsobject<NSDate> date_;
}
- (id)init:(NSString*)name;
@@ -546,7 +546,7 @@ TEST_F(MTPDeviceDelegateImplMacTest, TestDownload) {
info.last_accessed = t1;
info.creation_time = t1;
std::string kTestFileName("filename");
- scoped_nsobject<MockMTPICCameraFile> picture1(
+ base::scoped_nsobject<MockMTPICCameraFile> picture1(
[[MockMTPICCameraFile alloc]
init:base::SysUTF8ToNSString(kTestFileName)]);
[camera_ addMediaFile:picture1];
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.h b/chrome/browser/notifications/notification_ui_manager_mac.h
index 709e2d2..20cc582 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.h
+++ b/chrome/browser/notifications/notification_ui_manager_mac.h
@@ -11,7 +11,7 @@
#include <set>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "chrome/browser/notifications/balloon_notification_ui_manager.h"
@@ -74,7 +74,7 @@ class NotificationUIManagerMac : public BalloonNotificationUIManager {
const string16& replacement_id) const;
// Cocoa class that receives callbacks from the NSUserNotificationCenter.
- scoped_nsobject<NotificationCenterDelegate> delegate_;
+ base::scoped_nsobject<NotificationCenterDelegate> delegate_;
// Maps notification_ids to ControllerNotifications. The map owns the value,
// so it must be deleted when remvoed from the map. This is typically handled
diff --git a/chrome/browser/speech/tts_mac.mm b/chrome/browser/speech/tts_mac.mm
index bdb9b1c..a5a8aec 100644
--- a/chrome/browser/speech/tts_mac.mm
+++ b/chrome/browser/speech/tts_mac.mm
@@ -4,7 +4,7 @@
#include <string>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/singleton.h"
#include "base/strings/sys_string_conversions.h"
#include "base/values.h"
@@ -38,7 +38,7 @@ class TtsPlatformImplMac;
// crash when trying to call willSpeakWord.
@interface SingleUseSpeechSynthesizer : NSSpeechSynthesizer {
@private
- scoped_nsobject<NSString> utterance_;
+ base::scoped_nsobject<NSString> utterance_;
bool didSpeak_;
}
@@ -85,8 +85,8 @@ class TtsPlatformImplMac : public TtsPlatformImpl {
TtsPlatformImplMac();
virtual ~TtsPlatformImplMac();
- scoped_nsobject<SingleUseSpeechSynthesizer> speech_synthesizer_;
- scoped_nsobject<ChromeTtsDelegate> delegate_;
+ base::scoped_nsobject<SingleUseSpeechSynthesizer> speech_synthesizer_;
+ base::scoped_nsobject<ChromeTtsDelegate> delegate_;
int utterance_id_;
std::string utterance_;
bool sent_start_event_;
diff --git a/chrome/browser/ssl/ssl_add_cert_handler_mac.mm b/chrome/browser/ssl/ssl_add_cert_handler_mac.mm
index d12e477..bdcf6f3 100644
--- a/chrome/browser/ssl/ssl_add_cert_handler_mac.mm
+++ b/chrome/browser/ssl/ssl_add_cert_handler_mac.mm
@@ -8,7 +8,7 @@
#include <SecurityInterface/SFCertificateView.h>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
diff --git a/chrome/browser/storage_monitor/image_capture_device.h b/chrome/browser/storage_monitor/image_capture_device.h
index 0860d9d..82fd1b5 100644
--- a/chrome/browser/storage_monitor/image_capture_device.h
+++ b/chrome/browser/storage_monitor/image_capture_device.h
@@ -11,8 +11,8 @@
#include "base/files/file_path.h"
#include "base/mac/cocoa_protocols.h"
#include "base/mac/foundation_util.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/memory/weak_ptr.h"
#include "base/platform_file.h"
#include "base/strings/string_util.h"
@@ -58,7 +58,7 @@ class ImageCaptureDeviceListener {
@interface ImageCaptureDevice
: NSObject<ICCameraDeviceDelegate, ICCameraDeviceDownloadDelegate> {
@private
- scoped_nsobject<ICCameraDevice> camera_;
+ base::scoped_nsobject<ICCameraDevice> camera_;
base::WeakPtr<ImageCaptureDeviceListener> listener_;
bool closing_;
}
diff --git a/chrome/browser/storage_monitor/image_capture_device_manager.h b/chrome/browser/storage_monitor/image_capture_device_manager.h
index 22297c9..bc8c09e 100644
--- a/chrome/browser/storage_monitor/image_capture_device_manager.h
+++ b/chrome/browser/storage_monitor/image_capture_device_manager.h
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#include <string>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/storage_monitor/storage_monitor.h"
@protocol ICDeviceBrowserDelegate;
@@ -39,7 +39,7 @@ class ImageCaptureDeviceManager {
void SetNotifications(StorageMonitor::Receiver* notifications);
private:
- scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_;
+ base::scoped_nsobject<ImageCaptureDeviceManagerImpl> device_browser_;
};
} // namespace chrome
diff --git a/chrome/browser/storage_monitor/image_capture_device_manager.mm b/chrome/browser/storage_monitor/image_capture_device_manager.mm
index cfd5057..91191b4 100644
--- a/chrome/browser/storage_monitor/image_capture_device_manager.mm
+++ b/chrome/browser/storage_monitor/image_capture_device_manager.mm
@@ -25,8 +25,8 @@ chrome::ImageCaptureDeviceManager* g_image_capture_device_manager = NULL;
@interface ImageCaptureDeviceManagerImpl
: NSObject<ICDeviceBrowserDelegate> {
@private
- scoped_nsobject<ICDeviceBrowser> deviceBrowser_;
- scoped_nsobject<NSMutableArray> cameras_;
+ base::scoped_nsobject<ICDeviceBrowser> deviceBrowser_;
+ base::scoped_nsobject<NSMutableArray> cameras_;
// Guaranteed to outlive this class.
// TODO(gbillock): Update when ownership chains go up through
diff --git a/chrome/browser/storage_monitor/image_capture_device_manager_unittest.mm b/chrome/browser/storage_monitor/image_capture_device_manager_unittest.mm
index 2b3a16a..f55576f 100644
--- a/chrome/browser/storage_monitor/image_capture_device_manager_unittest.mm
+++ b/chrome/browser/storage_monitor/image_capture_device_manager_unittest.mm
@@ -45,7 +45,7 @@ const char kTestFileContents[] = "test";
@interface MockICCameraDevice : ICCameraDevice {
@private
- scoped_nsobject<NSMutableArray> allMediaFiles_;
+ base::scoped_nsobject<NSMutableArray> allMediaFiles_;
}
- (void)addMediaFile:(ICCameraFile*)file;
@@ -129,7 +129,7 @@ const char kTestFileContents[] = "test";
@interface MockICCameraFolder : ICCameraFolder {
@private
- scoped_nsobject<NSString> name_;
+ base::scoped_nsobject<NSString> name_;
}
- (id)initWithName:(NSString*)name;
@@ -157,9 +157,9 @@ const char kTestFileContents[] = "test";
@interface MockICCameraFile : ICCameraFile {
@private
- scoped_nsobject<NSString> name_;
- scoped_nsobject<NSDate> date_;
- scoped_nsobject<MockICCameraFolder> parent_;
+ base::scoped_nsobject<NSString> name_;
+ base::scoped_nsobject<NSDate> date_;
+ base::scoped_nsobject<MockICCameraFolder> parent_;
}
- (id)init:(NSString*)name;
@@ -262,7 +262,7 @@ class ImageCaptureDeviceManagerTest : public testing::Test {
MockICCameraDevice* AttachDevice(
chrome::ImageCaptureDeviceManager* manager) {
// Ownership will be passed to the device browser delegate.
- scoped_nsobject<MockICCameraDevice> device(
+ base::scoped_nsobject<MockICCameraDevice> device(
[[MockICCameraDevice alloc] init]);
id<ICDeviceBrowserDelegate> delegate = manager->device_browser();
[delegate deviceBrowser:nil didAddDevice:device moreComing:NO];
@@ -305,17 +305,16 @@ TEST_F(ImageCaptureDeviceManagerTest, OpenCamera) {
EXPECT_FALSE(chrome::ImageCaptureDeviceManager::deviceForUUID(
"nonexistent"));
- scoped_nsobject<ImageCaptureDevice> camera(
- [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId)
- retain]);
+ base::scoped_nsobject<ImageCaptureDevice> camera(
+ [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId) retain]);
[camera setListener:listener_.AsWeakPtr()];
[camera open];
- scoped_nsobject<MockICCameraFile> picture1(
+ base::scoped_nsobject<MockICCameraFile> picture1(
[[MockICCameraFile alloc] init:@"pic1"]);
[camera cameraDevice:nil didAddItem:picture1];
- scoped_nsobject<MockICCameraFile> picture2(
+ base::scoped_nsobject<MockICCameraFile> picture2(
[[MockICCameraFile alloc] init:@"pic2"]);
[camera cameraDevice:nil didAddItem:picture2];
ASSERT_EQ(2U, listener_.items().size());
@@ -339,9 +338,8 @@ TEST_F(ImageCaptureDeviceManagerTest, RemoveCamera) {
manager.SetNotifications(monitor_.receiver());
ICCameraDevice* device = AttachDevice(&manager);
- scoped_nsobject<ImageCaptureDevice> camera(
- [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId)
- retain]);
+ base::scoped_nsobject<ImageCaptureDevice> camera(
+ [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId) retain]);
[camera setListener:listener_.AsWeakPtr()];
[camera open];
@@ -359,18 +357,16 @@ TEST_F(ImageCaptureDeviceManagerTest, DownloadFile) {
manager.SetNotifications(monitor_.receiver());
MockICCameraDevice* device = AttachDevice(&manager);
- scoped_nsobject<ImageCaptureDevice> camera(
- [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId)
- retain]);
+ base::scoped_nsobject<ImageCaptureDevice> camera(
+ [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId) retain]);
[camera setListener:listener_.AsWeakPtr()];
[camera open];
std::string kTestFileName("pic1");
- scoped_nsobject<MockICCameraFile> picture1(
- [[MockICCameraFile alloc]
- init:base::SysUTF8ToNSString(kTestFileName)]);
+ base::scoped_nsobject<MockICCameraFile> picture1(
+ [[MockICCameraFile alloc] init:base::SysUTF8ToNSString(kTestFileName)]);
[device addMediaFile:picture1];
[camera cameraDevice:nil didAddItem:picture1];
@@ -417,17 +413,15 @@ TEST_F(ImageCaptureDeviceManagerTest, TestSubdirectories) {
manager.SetNotifications(monitor_.receiver());
MockICCameraDevice* device = AttachDevice(&manager);
- scoped_nsobject<ImageCaptureDevice> camera(
- [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId)
- retain]);
+ base::scoped_nsobject<ImageCaptureDevice> camera(
+ [chrome::ImageCaptureDeviceManager::deviceForUUID(kDeviceId) retain]);
[camera setListener:listener_.AsWeakPtr()];
[camera open];
std::string kTestFileName("pic1");
- scoped_nsobject<MockICCameraFile> picture1(
- [[MockICCameraFile alloc]
- init:base::SysUTF8ToNSString(kTestFileName)]);
+ base::scoped_nsobject<MockICCameraFile> picture1(
+ [[MockICCameraFile alloc] init:base::SysUTF8ToNSString(kTestFileName)]);
[picture1 setParent:base::SysUTF8ToNSString("dir")];
[device addMediaFile:picture1];
[camera cameraDevice:nil didAddItem:picture1];
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index 032b706..291d1d4 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -7,7 +7,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/lazy_instance.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/singleton.h"
#include "base/message_loop.h"
#include "base/observer_list.h"
@@ -75,7 +75,7 @@ class AppListServiceMac : public AppListServiceImpl,
AppListServiceMac() {}
- scoped_nsobject<AppListWindowController> window_controller_;
+ base::scoped_nsobject<AppListWindowController> window_controller_;
// App shim hosts observing when the app list is dismissed. In normal user
// usage there should only be one. However, it can't be guaranteed, so use
diff --git a/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm b/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
index 3f4eee7..e4c7bc1 100644
--- a/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#import "chrome/browser/ui/cocoa/about_ipc_controller.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
@@ -46,15 +46,15 @@ TEST_F(AboutIPCControllerTest, TestFilter) {
"NPObjectHell" };
for (size_t i = 0; i < arraysize(names); i++) {
data.message_name = names[i];
- scoped_nsobject<CocoaLogData> cdata([[CocoaLogData alloc]
- initWithLogData:data]);
+ base::scoped_nsobject<CocoaLogData> cdata(
+ [[CocoaLogData alloc] initWithLogData:data]);
EXPECT_FALSE([controller filterOut:cdata.get()]);
}
// Flip a checkbox, see it filtered, flip back, all is fine.
data.message_name = "ViewMsgFoo";
- scoped_nsobject<CocoaLogData> cdata([[CocoaLogData alloc]
- initWithLogData:data]);
+ base::scoped_nsobject<CocoaLogData> cdata(
+ [[CocoaLogData alloc] initWithLogData:data]);
[controller setDisplayViewMessages:NO];
EXPECT_TRUE([controller filterOut:cdata.get()]);
[controller setDisplayViewMessages:YES];
diff --git a/chrome/browser/ui/cocoa/animatable_image.h b/chrome/browser/ui/cocoa/animatable_image.h
index da1f297..102f337 100644
--- a/chrome/browser/ui/cocoa/animatable_image.h
+++ b/chrome/browser/ui/cocoa/animatable_image.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// This class helps animate an NSImage's frame and opacity. It works by creating
// a blank NSWindow in the size specified and giving it a layer on which the
@@ -20,7 +20,7 @@
@interface AnimatableImage : NSWindow {
@private
// The image to animate.
- scoped_nsobject<NSImage> image_;
+ base::scoped_nsobject<NSImage> image_;
// The frame of the image before and after the animation. This is in this
// window's coordinate system.
diff --git a/chrome/browser/ui/cocoa/animatable_view.h b/chrome/browser/ui/cocoa/animatable_view.h
index 91cae44..f84c2a5 100644
--- a/chrome/browser/ui/cocoa/animatable_view.h
+++ b/chrome/browser/ui/cocoa/animatable_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/background_gradient_view.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
@@ -24,7 +24,7 @@
IBOutlet id delegate_; // weak, used to send animation ended messages.
@private
- scoped_nsobject<NSAnimation> currentAnimation_;
+ base::scoped_nsobject<NSAnimation> currentAnimation_;
id<ViewResizer> resizeDelegate_; // weak, usually owns us
}
diff --git a/chrome/browser/ui/cocoa/animatable_view_unittest.mm b/chrome/browser/ui/cocoa/animatable_view_unittest.mm
index e59eae9..1554ff5 100644
--- a/chrome/browser/ui/cocoa/animatable_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/animatable_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/animatable_view.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/view_resizer_pong.h"
@@ -24,8 +24,8 @@ class AnimatableViewTest : public CocoaTest {
[view_ setResizeDelegate:resizeDelegate_.get()];
}
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
- scoped_nsobject<AnimatableView> view_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<AnimatableView> view_;
};
// Basic view tests (AddRemove, Display).
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h b/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h
index 2de6a78..b1f6b07 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h
@@ -5,10 +5,10 @@
#ifndef CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_
#define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_
-#import <objc/objc-runtime.h>
#import <Cocoa/Cocoa.h>
+#import <objc/objc-runtime.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/app_controller_mac.h"
#import "chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
@@ -42,9 +42,10 @@ class BookmarkAppleScriptTest : public CocoaProfileTest {
virtual ~BookmarkAppleScriptTest();
virtual void SetUp() OVERRIDE;
private:
- scoped_nsobject<FakeAppDelegate> appDelegate_;
+ base::scoped_nsobject<FakeAppDelegate> appDelegate_;
+
protected:
- scoped_nsobject<BookmarkFolderAppleScript> bookmarkBar_;
+ base::scoped_nsobject<BookmarkFolderAppleScript> bookmarkBar_;
};
#endif // CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_APPLESCRIPT_UTILS_UNITTEST_H_
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
index cb978bf..a9ca820 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -24,7 +24,7 @@
if (!node->is_folder())
continue;
- scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
+ base::scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
[[BookmarkFolderAppleScript alloc] initWithBookmarkNode:node]);
[bookmarkFolder setContainer:self
property:AppleScript::kBookmarkFoldersProperty];
@@ -95,7 +95,7 @@
if (!node->is_url())
continue;
- scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
+ base::scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
[[BookmarkItemAppleScript alloc] initWithBookmarkNode:node]);
[bookmarkItem setContainer:self
property:AppleScript::kBookmarkItemsProperty];
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_unittest.mm b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_unittest.mm
index 0bbd0b4..04bac0e 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_unittest.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h"
#import "chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.h"
@@ -45,9 +45,9 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkFolder) {
// Emulate what applescript would do when inserting a new bookmark folder.
// Emulates a script like |set var to make new bookmark folder with
// properties {title:"foo"}|.
- scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
+ base::scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
[[BookmarkFolderAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[bookmarkFolder.get() uniqueID] copy]);
+ base::scoped_nsobject<NSNumber> var([[bookmarkFolder.get() uniqueID] copy]);
[bookmarkFolder.get() setTitle:@"foo"];
[bookmarkBar_.get() insertInBookmarkFolders:bookmarkFolder.get()];
@@ -66,9 +66,9 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkFolderAtPosition) {
// Emulate what applescript would do when inserting a new bookmark folder.
// Emulates a script like |set var to make new bookmark folder with
// properties {title:"foo"} at after bookmark folder 1|.
- scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
+ base::scoped_nsobject<BookmarkFolderAppleScript> bookmarkFolder(
[[BookmarkFolderAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[bookmarkFolder.get() uniqueID] copy]);
+ base::scoped_nsobject<NSNumber> var([[bookmarkFolder.get() uniqueID] copy]);
[bookmarkFolder.get() setTitle:@"foo"];
[bookmarkBar_.get() insertInBookmarkFolders:bookmarkFolder.get() atIndex:1];
@@ -119,9 +119,9 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkItem) {
// Emulate what applescript would do when inserting a new bookmark folder.
// Emulates a script like |set var to make new bookmark item with
// properties {title:"Google", URL:"http://google.com"}|.
- scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
+ base::scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
[[BookmarkItemAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[bookmarkItem.get() uniqueID] copy]);
+ base::scoped_nsobject<NSNumber> var([[bookmarkItem.get() uniqueID] copy]);
[bookmarkItem.get() setTitle:@"Google"];
[bookmarkItem.get() setURL:@"http://google.com"];
[bookmarkBar_.get() insertInBookmarkItems:bookmarkItem.get()];
@@ -137,7 +137,7 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkItem) {
EXPECT_NSEQ(var.get(), [bi uniqueID]);
// Test to see no bookmark item is created when no/invlid URL is entered.
- scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
+ base::scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
[[FakeScriptCommand alloc] init]);
bookmarkItem.reset([[BookmarkItemAppleScript alloc] init]);
[bookmarkBar_.get() insertInBookmarkItems:bookmarkItem.get()];
@@ -151,9 +151,9 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkItemAtPosition) {
// Emulates a script like |set var to make new bookmark item with
// properties {title:"XKCD", URL:"http://xkcd.org}
// at after bookmark item 1|.
- scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
+ base::scoped_nsobject<BookmarkItemAppleScript> bookmarkItem(
[[BookmarkItemAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[bookmarkItem.get() uniqueID] copy]);
+ base::scoped_nsobject<NSNumber> var([[bookmarkItem.get() uniqueID] copy]);
[bookmarkItem.get() setTitle:@"XKCD"];
[bookmarkItem.get() setURL:@"http://xkcd.org"];
@@ -171,7 +171,7 @@ TEST_F(BookmarkFolderAppleScriptTest, InsertBookmarkItemAtPosition) {
EXPECT_NSEQ(var.get(), [bi uniqueID]);
// Test to see no bookmark item is created when no/invlid URL is entered.
- scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
+ base::scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
[[FakeScriptCommand alloc] init]);
bookmarkItem.reset([[BookmarkItemAppleScript alloc] init]);
[bookmarkBar_.get() insertInBookmarkItems:bookmarkItem.get() atIndex:1];
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_item_applescript_unittest.mm b/chrome/browser/ui/cocoa/applescript/bookmark_item_applescript_unittest.mm
index 44a309f..8e581f2 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_item_applescript_unittest.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_item_applescript_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.h"
#import "chrome/browser/ui/cocoa/applescript/bookmark_item_applescript.h"
@@ -35,7 +35,7 @@ TEST_F(BookmarkItemAppleScriptTest, GetAndSetURL) {
GURL(base::SysNSStringToUTF8([item1 URL])));
// If scripter enters invalid URL.
- scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
+ base::scoped_nsobject<FakeScriptCommand> fakeScriptCommand(
[[FakeScriptCommand alloc] init]);
[item1 setURL:@"invalid-url.org"];
EXPECT_EQ((int)AppleScript::errInvalidURL,
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm b/chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm
index 49fcc06..5255cd6 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.h"
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -31,7 +31,7 @@
return nil;
}
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithLongLong:model->next_node_id()]);
[self setUniqueID:numID];
[self setTempTitle:@""];
@@ -58,7 +58,7 @@
// and this particular bookmark item/folder is never returned.
bookmarkNode_ = aBookmarkNode;
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithLongLong:aBookmarkNode->id()]);
[self setUniqueID:numID];
}
@@ -73,7 +73,7 @@
// and this particular bookmark item/folder is never returned.
bookmarkNode_ = aBookmarkNode;
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithLongLong:aBookmarkNode->id()]);
[self setUniqueID:numID];
diff --git a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm
index d6e3326..6cdd204 100644
--- a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.h"
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -30,7 +30,7 @@
if ((*browserIterator)->IsAttemptingToCloseBrowser())
continue;
- scoped_nsobject<WindowAppleScript> window(
+ base::scoped_nsobject<WindowAppleScript> window(
[[WindowAppleScript alloc] initWithBrowser:*browserIterator]);
[window setContainer:NSApp
property:AppleScript::kWindowsProperty];
diff --git a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
index 0ac3eaa..901f7d6 100644
--- a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
+++ b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
@@ -47,8 +47,9 @@ IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest, InsertWindow) {
// Emulate what applescript would do when creating a new window.
// Emulate a script like |set var to make new window with properties
// {visible:false}|.
- scoped_nsobject<WindowAppleScript> aWindow([[WindowAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[aWindow.get() uniqueID] copy]);
+ base::scoped_nsobject<WindowAppleScript> aWindow(
+ [[WindowAppleScript alloc] init]);
+ base::scoped_nsobject<NSNumber> var([[aWindow.get() uniqueID] copy]);
[aWindow.get() setValue:[NSNumber numberWithBool:YES] forKey:@"isVisible"];
[NSApp insertInAppleScriptWindows:aWindow.get()];
@@ -66,7 +67,7 @@ IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest, InsertWindow) {
// Inserting and deleting windows.
IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest,
InsertAndDeleteWindows) {
- scoped_nsobject<WindowAppleScript> aWindow;
+ base::scoped_nsobject<WindowAppleScript> aWindow;
int count;
// Create a bunch of windows.
for (int i = 0; i < 5; ++i) {
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 7fc426f..e2a3539 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/sessions/session_id.h"
@@ -60,7 +60,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
SessionID session;
SessionID::id_type futureSessionIDOfTab = session.id() + 1;
// Holds the SessionID that the new tab is going to get.
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithInt:futureSessionIDOfTab]);
[self setUniqueID:numID];
}
@@ -85,7 +85,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
webContents_ = webContents;
SessionTabHelper* session_tab_helper =
SessionTabHelper::FromWebContents(webContents);
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithInt:session_tab_helper->session_id().id()]);
[self setUniqueID:numID];
}
@@ -100,7 +100,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
webContents_ = webContents;
SessionTabHelper* session_tab_helper =
SessionTabHelper::FromWebContents(webContents);
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithInt:session_tab_helper->session_id().id()]);
[self setUniqueID:numID];
diff --git a/chrome/browser/ui/cocoa/applescript/window_applescript.mm b/chrome/browser/ui/cocoa/applescript/window_applescript.mm
index fe6677f..f407d0f 100644
--- a/chrome/browser/ui/cocoa/applescript/window_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/window_applescript.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/applescript/window_applescript.h"
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
#import "chrome/browser/app_controller_mac.h"
@@ -75,7 +75,7 @@
Browser::CreateParams(aProfile, chrome::HOST_DESKTOP_TYPE_NATIVE));
chrome::NewTab(browser_);
browser_->window()->Show();
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithInt:browser_->session_id().id()]);
[self setUniqueID:numID];
}
@@ -93,7 +93,7 @@
// the applescript runtime calls appleScriptWindows in
// BrowserCrApplication and this particular window is never returned.
browser_ = aBrowser;
- scoped_nsobject<NSNumber> numID(
+ base::scoped_nsobject<NSNumber> numID(
[[NSNumber alloc] initWithInt:browser_->session_id().id()]);
[self setUniqueID:numID];
}
@@ -159,7 +159,7 @@
continue;
}
- scoped_nsobject<TabAppleScript> tab(
+ base::scoped_nsobject<TabAppleScript> tab(
[[TabAppleScript alloc] initWithWebContents:webContents]);
[tab setContainer:self
property:AppleScript::kTabsProperty];
diff --git a/chrome/browser/ui/cocoa/applescript/window_applescript_test.mm b/chrome/browser/ui/cocoa/applescript/window_applescript_test.mm
index f13b03b..f627622 100644
--- a/chrome/browser/ui/cocoa/applescript/window_applescript_test.mm
+++ b/chrome/browser/ui/cocoa/applescript/window_applescript_test.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/app_controller_mac.h"
#import "chrome/browser/chrome_browser_application_mac.h"
@@ -22,7 +22,7 @@ typedef InProcessBrowserTest WindowAppleScriptTest;
// Create a window in default/normal mode.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, DefaultCreation) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] init]);
EXPECT_TRUE(aWindow.get());
NSString* mode = [aWindow.get() mode];
@@ -32,7 +32,7 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, DefaultCreation) {
// Create a window with a |NULL profile|.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithNoProfile) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithProfile:NULL]);
EXPECT_FALSE(aWindow.get());
}
@@ -40,7 +40,7 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithNoProfile) {
// Create a window with a particular profile.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithProfile) {
Profile* lastProfile = [[NSApp delegate] lastProfile];
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithProfile:lastProfile]);
EXPECT_TRUE(aWindow.get());
EXPECT_TRUE([aWindow.get() uniqueID]);
@@ -48,14 +48,14 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithProfile) {
// Create a window with no |Browser*|.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithNoBrowser) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:NULL]);
EXPECT_FALSE(aWindow.get());
}
// Create a window with |Browser*| already present.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithBrowser) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
EXPECT_TRUE(aWindow.get());
EXPECT_TRUE([aWindow.get() uniqueID]);
@@ -63,7 +63,7 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, CreationWithBrowser) {
// Tabs within the window.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, Tabs) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
NSArray* tabs = [aWindow.get() tabs];
EXPECT_EQ(1U, [tabs count]);
@@ -78,10 +78,10 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, InsertTab) {
// Emulate what applescript would do when creating a new tab.
// Emulates a script like |set var to make new tab with
// properties URL:"http://google.com"}|.
- scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[aTab.get() uniqueID] copy]);
+ base::scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
+ base::scoped_nsobject<NSNumber> var([[aTab.get() uniqueID] copy]);
[aTab.get() setURL:@"http://google.com"];
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
[aWindow.get() insertInTabs:aTab.get()];
@@ -100,10 +100,10 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, InsertTabAtPosition) {
// Emulate what applescript would do when creating a new tab.
// Emulates a script like |set var to make new tab with
// properties URL:"http://google.com"} at before tab 1|.
- scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
- scoped_nsobject<NSNumber> var([[aTab.get() uniqueID] copy]);
+ base::scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
+ base::scoped_nsobject<NSNumber> var([[aTab.get() uniqueID] copy]);
[aTab.get() setURL:@"http://google.com"];
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
[aWindow.get() insertInTabs:aTab.get() atIndex:0];
@@ -118,9 +118,9 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, InsertTabAtPosition) {
// Inserting and deleting tabs.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, InsertAndDeleteTabs) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
- scoped_nsobject<TabAppleScript> aTab;
+ base::scoped_nsobject<TabAppleScript> aTab;
int count;
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 3; ++j) {
@@ -143,7 +143,7 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, InsertAndDeleteTabs) {
// Getting and setting values from the NSWindow.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, NSWindowTest) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
[aWindow.get() setValue:[NSNumber numberWithBool:YES]
forKey:@"isMiniaturized"];
@@ -155,9 +155,9 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, NSWindowTest) {
// Getting and setting the active tab.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, ActiveTab) {
- scoped_nsobject<WindowAppleScript> aWindow(
+ base::scoped_nsobject<WindowAppleScript> aWindow(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
- scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
+ base::scoped_nsobject<TabAppleScript> aTab([[TabAppleScript alloc] init]);
[aWindow.get() insertInTabs:aTab.get()];
[aWindow.get() setActiveTabIndex:[NSNumber numberWithInt:2]];
EXPECT_EQ(2, [[aWindow.get() activeTabIndex] intValue]);
@@ -168,9 +168,9 @@ IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, ActiveTab) {
// Order of windows.
IN_PROC_BROWSER_TEST_F(WindowAppleScriptTest, WindowOrder) {
- scoped_nsobject<WindowAppleScript> window2(
+ base::scoped_nsobject<WindowAppleScript> window2(
[[WindowAppleScript alloc] initWithBrowser:browser()]);
- scoped_nsobject<WindowAppleScript> window1(
+ base::scoped_nsobject<WindowAppleScript> window1(
[[WindowAppleScript alloc] init]);
EXPECT_EQ([window1.get() windowComparator:window2.get()], NSOrderedAscending);
EXPECT_EQ([window2.get() windowComparator:window1.get()],
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h
index c1b1116..67d2bff 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace autofill {
class AutofillDialogController;
@@ -17,9 +17,9 @@ namespace autofill {
@interface AutofillAccountChooser : NSView {
@private
- scoped_nsobject<NSButton> link_;
- scoped_nsobject<MenuButton> popup_;
- scoped_nsobject<NSImageView> icon_;
+ base::scoped_nsobject<NSButton> link_;
+ base::scoped_nsobject<MenuButton> popup_;
+ base::scoped_nsobject<NSImageView> icon_;
autofill::AutofillDialogController* controller_; // weak.
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
index c3904ae..35111d2 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
@@ -26,10 +26,10 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
return;
}
- scoped_nsobject<NSMenuItem> item([[NSMenuItem alloc]
- initWithTitle:title
- action:selector
- keyEquivalent:@""]);
+ base::scoped_nsobject<NSMenuItem> item(
+ [[NSMenuItem alloc] initWithTitle:title
+ action:selector
+ keyEquivalent:@""]);
[item setTag:tag];
[menu addItem:item];
[item setTarget:target];
@@ -63,7 +63,7 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor())];
popup_.reset([[MenuButton alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<DownArrowPopupMenuCell> popupCell(
+ base::scoped_nsobject<DownArrowPopupMenuCell> popupCell(
[[DownArrowPopupMenuCell alloc] initTextCell:@""]);
[popup_ setCell:popupCell];
@@ -75,7 +75,7 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
[popupCell setImage:popupImage
forButtonState:image_button_cell::kDefaultState];
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
[menu setAutoenablesItems:NO];
[popup_ setAttachedMenu:menu];
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
index e6ce376..d4717cb 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
@@ -27,7 +27,7 @@ class AutofillAccountChooserTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillAccountChooser> view_;
+ base::scoped_nsobject<AutofillAccountChooser> view_;
testing::NiceMock<autofill::MockAutofillDialogController> controller_;
private:
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_details_container.h b/chrome/browser/ui/cocoa/autofill/autofill_details_container.h
index 79c5804..aa99561 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_details_container.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_details_container.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
@@ -20,7 +20,8 @@ class AutofillDialogController;
// UI controller for details for current payment instrument.
@interface AutofillDetailsContainer : NSViewController<AutofillLayout> {
@private
- scoped_nsobject<NSMutableArray> details_; // The individual detail sections.
+ base::scoped_nsobject<NSMutableArray> details_; // The individual detail
+ // sections.
autofill::AutofillDialogController* controller_; // Not owned.
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_details_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_details_container.mm
index 5a88597..4f07578 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_details_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_details_container.mm
@@ -19,7 +19,7 @@
}
- (void)addSection:(autofill::DialogSection)section {
- scoped_nsobject<AutofillSectionContainer> sectionContainer(
+ base::scoped_nsobject<AutofillSectionContainer> sectionContainer(
[[AutofillSectionContainer alloc] initWithController:controller_
forSection:section]);
[details_ addObject:sectionContainer];
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm
index 4841710..7cbc178 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -21,7 +21,7 @@ class AutofillDetailsContainerTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillDetailsContainer> container_;
+ base::scoped_nsobject<AutofillDetailsContainer> container_;
testing::NiceMock<autofill::MockAutofillDialogController> controller_;
};
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
index 710fd55..917e2ec 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_
#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
#include "chrome/browser/ui/autofill/autofill_dialog_view.h"
@@ -66,7 +66,7 @@ class AutofillDialogCocoa : public AutofillDialogView,
private:
scoped_ptr<ConstrainedWindowMac> constrained_window_;
- scoped_nsobject<AutofillDialogWindowController> sheet_controller_;
+ base::scoped_nsobject<AutofillDialogWindowController> sheet_controller_;
// The controller |this| queries for logic and state.
AutofillDialogController* controller_;
@@ -80,9 +80,9 @@ class AutofillDialogCocoa : public AutofillDialogView,
content::WebContents* webContents_; // weak.
autofill::AutofillDialogCocoa* autofillDialog_; // weak.
- scoped_nsobject<AutofillMainContainer> mainContainer_;
- scoped_nsobject<AutofillSignInContainer> signInContainer_;
- scoped_nsobject<AutofillAccountChooser> accountChooser_;
+ base::scoped_nsobject<AutofillMainContainer> mainContainer_;
+ base::scoped_nsobject<AutofillSignInContainer> signInContainer_;
+ base::scoped_nsobject<AutofillAccountChooser> accountChooser_;
}
// Designated initializer. The WebContents cannot be NULL.
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
index 797368b..de12066 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
@@ -5,10 +5,9 @@
#include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/chrome_style.h"
-#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
#include "chrome/browser/ui/chrome_style.h"
#include "chrome/browser/ui/chrome_style.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h"
@@ -16,6 +15,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h"
+#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#import "ui/base/cocoa/flipped_view.h"
@@ -49,7 +49,7 @@ void AutofillDialogCocoa::Show() {
sheet_controller_.reset([[AutofillDialogWindowController alloc]
initWithWebContents:controller_->web_contents()
autofillDialog:this]);
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[sheet_controller_ window]]);
constrained_window_.reset(
@@ -136,7 +136,7 @@ void AutofillDialogCocoa::OnConstrainedWindowClosed(
autofillDialog:(autofill::AutofillDialogCocoa*)autofillDialog {
DCHECK(webContents);
- scoped_nsobject<ConstrainedWindowCustomWindow> window(
+ base::scoped_nsobject<ConstrainedWindowCustomWindow> window(
[[ConstrainedWindowCustomWindow alloc]
initWithContentRect:ui::kWindowSizeDeterminedLater]);
@@ -169,7 +169,7 @@ void AutofillDialogCocoa::OnConstrainedWindowClosed(
// This needs a flipped content view because otherwise the size
// animation looks odd. However, replacing the contentView for constrained
// windows does not work - it does custom rendering.
- scoped_nsobject<NSView> flippedContentView(
+ base::scoped_nsobject<NSView> flippedContentView(
[[FlippedView alloc] initWithFrame:NSZeroRect]);
[flippedContentView setSubviews:
@[accountChooser_, [mainContainer_ view], [signInContainer_ view]]];
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container.h b/chrome/browser/ui/cocoa/autofill/autofill_main_container.h
index b05a713..9767a25 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_main_container.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
@@ -25,8 +25,8 @@ namespace autofill {
// Might dynamically add and remove other elements.
@interface AutofillMainContainer : NSViewController<AutofillLayout> {
@private
- scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_;
- scoped_nsobject<AutofillDetailsContainer> detailsContainer_;
+ base::scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_;
+ base::scoped_nsobject<AutofillDetailsContainer> detailsContainer_;
AutofillDialogWindowController* target_;
autofill::AutofillDialogController* controller_; // Not owned.
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
index 80b050cc..7d9fddb 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
@@ -35,7 +35,7 @@
- (void)loadView {
[self buildWindowButtonsForFrame:NSZeroRect];
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
[view setAutoresizesSubviews:YES];
[view setSubviews:@[buttonContainer_]];
[self setView:view];
@@ -77,7 +77,7 @@
[buttonContainer_
setAutoresizingMask:(NSViewMinXMargin | NSViewMaxYMargin)];
- scoped_nsobject<NSButton> button(
+ base::scoped_nsobject<NSButton> button(
[[ConstrainedWindowButton alloc] initWithFrame:NSZeroRect]);
[button setTitle:l10n_util::GetNSStringWithFixup(IDS_CANCEL)];
[button setKeyEquivalent:kKeyEquivalentEscape];
@@ -105,7 +105,7 @@
}
- (void)layoutButtons {
- scoped_nsobject<GTMUILocalizerAndLayoutTweaker> layoutTweaker(
+ base::scoped_nsobject<GTMUILocalizerAndLayoutTweaker> layoutTweaker(
[[GTMUILocalizerAndLayoutTweaker alloc] init]);
[layoutTweaker tweakUI:buttonContainer_];
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
index a52103d..ac24cb7 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -23,7 +23,7 @@ class AutofillMainContainerTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillMainContainer> container_;
+ base::scoped_nsobject<AutofillMainContainer> container_;
testing::NiceMock<autofill::MockAutofillDialogController> controller_;
};
@@ -48,4 +48,4 @@ TEST_F(AutofillMainContainerTest, SubViews) {
}
EXPECT_TRUE(hasButtons);
-} \ No newline at end of file
+}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h
index 99a4095..e570646 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h
@@ -8,7 +8,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/autofill_popup_view.h"
@class AutofillPopupViewCocoa;
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.h b/chrome/browser/ui/cocoa/autofill/autofill_section_container.h
index 1abaab0..62ff41b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
@@ -27,13 +27,14 @@ namespace autofill {
@interface AutofillSectionContainer :
NSViewController<AutofillLayout> {
@private
- scoped_nsobject<LayoutView> inputs_;
- scoped_nsobject<MenuButton> suggestButton_;
- scoped_nsobject<AutofillSuggestionContainer> suggestContainer_;
- scoped_nsobject<NSTextField> label_;
- scoped_nsobject<AutofillSectionView> view_; // The view for the container.
+ base::scoped_nsobject<LayoutView> inputs_;
+ base::scoped_nsobject<MenuButton> suggestButton_;
+ base::scoped_nsobject<AutofillSuggestionContainer> suggestContainer_;
+ base::scoped_nsobject<NSTextField> label_;
+ base::scoped_nsobject<AutofillSectionView> view_; // The view for the
+ // container.
- scoped_nsobject<MenuController> menuController_;
+ base::scoped_nsobject<MenuController> menuController_;
autofill::DialogSection section_;
autofill::AutofillDialogController* controller_; // Not owned.
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index 73ef309..2da1f4cb 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -198,7 +198,7 @@ void BreakSuggestionText(const string16& text,
}
- (NSTextField*)makeDetailSectionLabel:(NSString*)labelText {
- scoped_nsobject<NSTextField> label([[NSTextField alloc] init]);
+ base::scoped_nsobject<NSTextField> label([[NSTextField alloc] init]);
[label setFont:
[[NSFontManager sharedFontManager] convertFont:[label font]
toHaveTrait:NSBoldFontMask]];
@@ -211,7 +211,7 @@ void BreakSuggestionText(const string16& text,
}
- (MenuButton*)makeSuggestionButton {
- scoped_nsobject<MenuButton> button([[MenuButton alloc] init]);
+ base::scoped_nsobject<MenuButton> button([[MenuButton alloc] init]);
[button setOpenMenuOnClick:YES];
[button setBordered:NO];
@@ -245,7 +245,7 @@ void BreakSuggestionText(const string16& text,
const autofill::DetailInputs& inputs =
controller_->RequestedFieldsForSection(section_);
- scoped_nsobject<LayoutView> view([[LayoutView alloc] init]);
+ base::scoped_nsobject<LayoutView> view([[LayoutView alloc] init]);
[view setLayoutManager:
scoped_ptr<SimpleGridLayout>(new SimpleGridLayout(view))];
SimpleGridLayout* layout = [view layoutManager];
@@ -274,7 +274,7 @@ void BreakSuggestionText(const string16& text,
ui::ComboboxModel* input_model =
controller_->ComboboxModelForAutofillType(input.type);
if (input_model) {
- scoped_nsobject<NSPopUpButton> popup(
+ base::scoped_nsobject<NSPopUpButton> popup(
[[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:YES]);
for (int i = 0; i < input_model->GetItemCount(); ++i) {
[popup addItemWithTitle:
@@ -285,7 +285,7 @@ void BreakSuggestionText(const string16& text,
[popup setTag:reinterpret_cast<NSInteger>(&input)];
layout->AddView(popup);
} else {
- scoped_nsobject<AutofillTextField> field(
+ base::scoped_nsobject<AutofillTextField> field(
[[AutofillTextField alloc] init]);
[[field cell] setPlaceholderString:
l10n_util::GetNSStringWithFixup(input.placeholder_text_rid)];
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container_unittest.mm
index 651d0c05..12c8199 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container_unittest.mm
@@ -5,15 +5,15 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h"
#import "chrome/browser/ui/cocoa/autofill/layout_view.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "grit/generated_resources.h"
-#include "testing/gtest_mac.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
#include "testing/platform_test.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/models/simple_menu_model.h"
@@ -41,7 +41,7 @@ class AutofillSectionContainerTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillSectionContainer> container_;
+ base::scoped_nsobject<AutofillSectionContainer> container_;
testing::NiceMock<autofill::MockAutofillDialogController> controller_;
};
@@ -163,4 +163,4 @@ TEST_F(AutofillSectionContainerTest, SuggestionsPopulatedByController) {
EXPECT_NSEQ(@"a", [[menu itemAtIndex:1] title]);
EXPECT_NSEQ(@"b", [[menu itemAtIndex:2] title]);
-} \ No newline at end of file
+}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_view_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_view_unittest.mm
index 2515c71..8cad9d7 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_view_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_section_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
@@ -74,8 +74,8 @@ class AutofillSectionViewTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillSectionView> view_;
- scoped_nsobject<NSBitmapImageRep> bitmap_;
+ base::scoped_nsobject<AutofillSectionView> view_;
+ base::scoped_nsobject<NSBitmapImageRep> bitmap_;
scoped_ptr<gfx::ScopedNSGraphicsContextSaveGState> saved_context_;
NSGraphicsContext* context_;
};
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
index 83220df..77f8a4b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
@@ -60,7 +60,7 @@ class AutofillSignInContainerTest : public ChromeRenderViewHostTestHarness {
}
protected:
- scoped_nsobject<AutofillSignInContainer> container_;
+ base::scoped_nsobject<AutofillSignInContainer> container_;
testing::NiceMock<autofill::MockAutofillDialogController> controller_;
CocoaTestHelperWindow* test_window_;
};
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h
index 6253a20..6fe11d7 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
namespace autofill {
@@ -20,16 +20,16 @@ namespace autofill {
@interface AutofillSuggestionContainer : NSViewController<AutofillLayout> {
@private
// The label that holds the suggestion description text.
- scoped_nsobject<NSTextField> label_;
+ base::scoped_nsobject<NSTextField> label_;
// The second (and longer) line of text that describes the suggestion.
- scoped_nsobject<NSTextField> label2_;
+ base::scoped_nsobject<NSTextField> label2_;
// The icon that comes just before |label_|.
- scoped_nsobject<NSImageView> iconImageView_;
+ base::scoped_nsobject<NSImageView> iconImageView_;
// The input set by ShowTextfield.
- scoped_nsobject<AutofillTextField> inputField_;
+ base::scoped_nsobject<AutofillTextField> inputField_;
autofill::AutofillDialogController* controller_; // Not owned.
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
index 6522e69..9989f83 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
@@ -8,7 +8,7 @@
#include <cmath>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/chrome_style.h"
@@ -38,7 +38,7 @@ NSRect CenterVertically(NSRect rect1, NSRect rect2) {
@implementation AutofillSuggestionContainer
- (NSTextField*)makeDetailSectionLabel:(NSString*)labelText {
- scoped_nsobject<NSTextField> label([[NSTextField alloc] init]);
+ base::scoped_nsobject<NSTextField> label([[NSTextField alloc] init]);
[label setFont:
[[NSFontManager sharedFontManager] convertFont:[label font]
toHaveTrait:NSBoldFontMask]];
@@ -60,14 +60,14 @@ NSRect CenterVertically(NSRect rect1, NSRect rect2) {
inputField_.reset([[AutofillTextField alloc] initWithFrame:NSZeroRect]);
[inputField_ setHidden:YES];
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
[view setSubviews:
@[iconImageView_, label_, inputField_, label2_ ]];
[self setView:view];
}
- (NSTextField*)createLabelWithFrame:(NSRect)frame {
- scoped_nsobject<NSTextField> label(
+ base::scoped_nsobject<NSTextField> label(
[[NSTextField alloc] initWithFrame:frame]);
[label setEditable:NO];
[label setDrawsBackground:NO];
@@ -174,4 +174,4 @@ NSRect CenterVertically(NSRect rect1, NSRect rect2) {
[[self view] setFrameSize:preferredContainerSize];
}
-@end \ No newline at end of file
+@end
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
index 08b3848..e535d41 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
@@ -20,7 +20,7 @@ class AutofillSuggestionContainerTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<AutofillSuggestionContainer> container_;
+ base::scoped_nsobject<AutofillSuggestionContainer> container_;
};
} // namespace
@@ -47,4 +47,4 @@ TEST_F(AutofillSuggestionContainerTest, HasSubviews) {
EXPECT_EQ(2, num_text_fields);
EXPECT_TRUE(has_edit_field);
EXPECT_TRUE(has_icon);
-} \ No newline at end of file
+}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_textfield.h b/chrome/browser/ui/cocoa/autofill/autofill_textfield.h
index 57fcea7..264ad29 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_textfield.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_textfield.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include <base/memory/scoped_nsobject.h>
+#include <base/mac/scoped_nsobject.h>
// Text field used for text inputs inside Autofill.
// Provide both dog ear and red outline when the contents are marked invalid.
@@ -17,7 +17,7 @@
@interface AutofillTextFieldCell : NSTextFieldCell {
@private
BOOL invalid_;
- scoped_nsobject<NSImage> icon_;
+ base::scoped_nsobject<NSImage> icon_;
}
@property(assign, nonatomic) BOOL invalid;
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_textfield_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_textfield_unittest.mm
index ed6fa79..f32e636 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_textfield_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_textfield_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -20,7 +20,7 @@ class AutofillTextFieldTest : public CocoaTest {
}
protected:
- scoped_nsobject<AutofillTextField> textfield_;
+ base::scoped_nsobject<AutofillTextField> textfield_;
DISALLOW_COPY_AND_ASSIGN(AutofillTextFieldTest);
};
diff --git a/chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm b/chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm
index d41b496..4d878d6 100644
--- a/chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell_unittest.mm
@@ -6,7 +6,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -19,13 +19,13 @@ class DownArrowPopupMenuCellTest : public ui::CocoaTest {
DownArrowPopupMenuCellTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
view_.reset([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<DownArrowPopupMenuCell> cell(
+ base::scoped_nsobject<DownArrowPopupMenuCell> cell(
[[DownArrowPopupMenuCell alloc] initTextCell:@"Testing"]);
[view_ setCell:cell.get()];
[[test_window() contentView] addSubview:view_]; }
protected:
- scoped_nsobject<NSButton> view_;
+ base::scoped_nsobject<NSButton> view_;
private:
DISALLOW_COPY_AND_ASSIGN(DownArrowPopupMenuCellTest);
@@ -50,7 +50,8 @@ TEST_F(DownArrowPopupMenuCellTest, Defaults) {
ASSERT_TRUE([cell isKindOfClass:[DownArrowPopupMenuCell class]]);
NSRect rect = NSMakeRect(0, 0, 11, 17);
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:rect.size]);
+ base::scoped_nsobject<NSImage> image(
+ [[NSImage alloc] initWithSize:rect.size]);
[cell setImage:image forButtonState:image_button_cell::kDefaultState];
[view_ setTitle:@"Testing"];
diff --git a/chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm b/chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm
index abfcd227..c56c9f8 100644
--- a/chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/autofill/layout_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -24,7 +24,7 @@ class LayoutViewTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<LayoutView> view_;
+ base::scoped_nsobject<LayoutView> view_;
SimpleGridLayout* layout_; // weak, owned by view_.
};
@@ -40,9 +40,9 @@ TEST_F(LayoutViewTest, setFrameInvokesLayout) {
cs->AddColumn(0.4);
cs->AddColumn(0.6);
layout_->StartRow(0, 0);
- scoped_nsobject<NSView> childView1(
+ base::scoped_nsobject<NSView> childView1(
[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 0, 45)]);
- scoped_nsobject<NSView> childView2(
+ base::scoped_nsobject<NSView> childView2(
[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 20, 55)]);
layout_->AddView(childView1);
layout_->AddView(childView2);
@@ -62,4 +62,4 @@ TEST_F(LayoutViewTest, setFrameInvokesLayout) {
subview = [[view_ subviews] objectAtIndex:1];
EXPECT_FLOAT_EQ(24, NSWidth([subview frame]));
EXPECT_FLOAT_EQ(55, NSHeight([subview frame]));
-} \ No newline at end of file
+}
diff --git a/chrome/browser/ui/cocoa/autofill/simple_grid_layout_unittest.mm b/chrome/browser/ui/cocoa/autofill/simple_grid_layout_unittest.mm
index d529211..da517c7 100644
--- a/chrome/browser/ui/cocoa/autofill/simple_grid_layout_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/simple_grid_layout_unittest.mm
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -19,15 +19,15 @@ class ColumnLayout : public SimpleGridLayout {
class LayoutTest : public testing::Test {
public:
- scoped_nsobject<NSView> CreateViewWithWidth(float width) {
+ base::scoped_nsobject<NSView> CreateViewWithWidth(float width) {
NSRect frame = NSMakeRect(0, 0, width, 0);
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
return view;
}
- scoped_nsobject<NSView> CreateViewWithHeight(float height) {
+ base::scoped_nsobject<NSView> CreateViewWithHeight(float height) {
NSRect frame = NSMakeRect(0, 0, 0, height);
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
return view;
}
};
@@ -107,7 +107,7 @@ TEST_F(LayoutTest, AddPaddingRow) {
ColumnSet* cs;
cs = layout.AddRow();
cs->AddColumn(1.0f);
- scoped_nsobject<NSView> view1 = CreateViewWithHeight(30.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithHeight(30.0f);
layout.AddView(view1);
layout.AddPaddingRow(20);
@@ -115,7 +115,7 @@ TEST_F(LayoutTest, AddPaddingRow) {
cs = layout.AddRow();
cs->AddColumn(1.0f);
EXPECT_EQ(3, layout.num_rows());
- scoped_nsobject<NSView> view2 = CreateViewWithHeight(10.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithHeight(10.0f);
layout.AddView(view2);
layout.SizeRowsAndColumns(0.0f);
@@ -132,17 +132,17 @@ TEST_F(LayoutTest, RowsAccomodateHeightOfAllElements) {
layout.GetLastValidColumnSet()->AddColumn(0.6f);
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view1 = CreateViewWithHeight(37.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithHeight(37.0f);
layout.AddView(view1);
layout.SizeRowsAndColumns(0.0f);
EXPECT_FLOAT_EQ(37.0f, layout.GetRowHeight(0));
- scoped_nsobject<NSView> view2 = CreateViewWithHeight(26.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithHeight(26.0f);
layout.AddView(view2);
layout.SizeRowsAndColumns(0.0f);
EXPECT_FLOAT_EQ(37.0f, layout.GetRowHeight(0));
- scoped_nsobject<NSView> view3 = CreateViewWithHeight(42.0f);
+ base::scoped_nsobject<NSView> view3 = CreateViewWithHeight(42.0f);
layout.AddView(view3);
layout.SizeRowsAndColumns(0.0f);
EXPECT_FLOAT_EQ(42.0f, layout.GetRowHeight(0));
@@ -153,12 +153,12 @@ TEST_F(LayoutTest, SizeRowsAdjustsRowLocations) {
layout.AddRow();
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view1 = CreateViewWithHeight(30.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithHeight(30.0f);
layout.AddView(view1);
layout.AddRow();
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view2 = CreateViewWithHeight(40.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithHeight(40.0f);
layout.AddView(view2);
layout.SizeRowsAndColumns(0.0f);
@@ -174,17 +174,17 @@ TEST_F(LayoutTest, SimpleGridLayoutAdjustsViews) {
layout.GetLastValidColumnSet()->AddPaddingColumn(30);
layout.GetLastValidColumnSet()->AddColumn(0.4f);
- scoped_nsobject<NSView> view1 = CreateViewWithHeight(22.0f);
- scoped_nsobject<NSView> view2 = CreateViewWithHeight(20.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithHeight(22.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithHeight(20.0f);
layout.AddView(view1);
layout.AddView(view2);
layout.AddRow();
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view3 = CreateViewWithHeight(18.0f);
+ base::scoped_nsobject<NSView> view3 = CreateViewWithHeight(18.0f);
layout.AddView(view3);
- scoped_nsobject<NSView> host_view = CreateViewWithWidth(150.0f);
+ base::scoped_nsobject<NSView> host_view = CreateViewWithWidth(150.0f);
layout.Layout(host_view);
EXPECT_FLOAT_EQ(72.0f, NSWidth([view1 frame]));
@@ -214,7 +214,7 @@ TEST_F(LayoutTest, SimpleGridLayoutHeightForWidth)
layout.AddRow();
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view1 = CreateViewWithHeight(22.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithHeight(22.0f);
layout.AddView(view1);
EXPECT_FLOAT_EQ(22.0f, layout.GetPreferredHeightForWidth(100.0));
@@ -223,7 +223,7 @@ TEST_F(LayoutTest, SimpleGridLayoutHeightForWidth)
layout.AddRow();
layout.GetLastValidColumnSet()->AddColumn(0.6f);
- scoped_nsobject<NSView> view2 = CreateViewWithHeight(13.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithHeight(13.0f);
layout.AddView(view2);
EXPECT_FLOAT_EQ(47.0f, layout.GetPreferredHeightForWidth(100.0));
}
@@ -308,7 +308,7 @@ TEST_F(LayoutTest, AddViewSkipsPaddingColumns) {
layout.GetLastValidColumnSet()->AddColumn(0.4f);
EXPECT_EQ(0, layout.next_column());
- scoped_nsobject<NSView> view1 = CreateViewWithWidth(37.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithWidth(37.0f);
layout.AddView(view1);
EXPECT_EQ(2, layout.next_column());
}
@@ -321,12 +321,12 @@ TEST_F(LayoutTest, ColumnLayoutAdjustsViews) {
layout.GetLastValidColumnSet()->AddPaddingColumn(30);
layout.GetLastValidColumnSet()->AddColumn(0.4f);
- scoped_nsobject<NSView> view1 = CreateViewWithWidth(37.0f);
- scoped_nsobject<NSView> view2 = CreateViewWithWidth(42.0f);
+ base::scoped_nsobject<NSView> view1 = CreateViewWithWidth(37.0f);
+ base::scoped_nsobject<NSView> view2 = CreateViewWithWidth(42.0f);
layout.AddView(view1);
layout.AddView(view2);
- scoped_nsobject<NSView> host_view = CreateViewWithWidth(150.0f);
+ base::scoped_nsobject<NSView> host_view = CreateViewWithWidth(150.0f);
layout.Layout(host_view);
EXPECT_FLOAT_EQ(72.0f, NSWidth([view1 frame]));
diff --git a/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm b/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
index d1cda6c..b7e9697 100644
--- a/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/background_gradient_view.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -36,7 +36,7 @@ class BackgroundGradientViewTest : public CocoaTest {
public:
BackgroundGradientViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<BackgroundGradientSubClassTest> view;
+ base::scoped_nsobject<BackgroundGradientSubClassTest> view;
view.reset([[BackgroundGradientSubClassTest alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 91eaa98..c7ef5b6 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
@@ -76,7 +76,7 @@
DCHECK(![[self window] delegate]);
[theWindow setDelegate:self];
- scoped_nsobject<InfoBubbleView> contentView(
+ base::scoped_nsobject<InfoBubbleView> contentView(
[[InfoBubbleView alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]);
[theWindow setContentView:contentView.get()];
bubble_ = contentView.get();
@@ -123,7 +123,7 @@
- (NSBox*)separatorWithFrame:(NSRect)frame {
frame.size.height = 1.0;
- scoped_nsobject<NSBox> spacer([[NSBox alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSBox> spacer([[NSBox alloc] initWithFrame:frame]);
[spacer setBoxType:NSBoxSeparator];
[spacer setBorderType:NSLineBorder];
[spacer setAlphaValue:0.2];
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
index 307034c..feccd6f 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#include "base/mac/mac_util.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/run_loop_testing.h"
@@ -44,7 +44,7 @@ class BaseBubbleControllerTest : public CocoaTest {
}
public:
- scoped_nsobject<NSWindow> bubbleWindow_;
+ base::scoped_nsobject<NSWindow> bubbleWindow_;
BaseBubbleController* controller_;
};
@@ -118,12 +118,12 @@ TEST_F(BaseBubbleControllerTest, AnchorAlignRightArrow) {
// the key window changes.
TEST_F(BaseBubbleControllerTest, ResignKeyCloses) {
// Closing the bubble will autorelease the controller.
- scoped_nsobject<BaseBubbleController> keep_alive([controller_ retain]);
+ base::scoped_nsobject<BaseBubbleController> keep_alive([controller_ retain]);
NSWindow* bubble_window = [controller_ window];
EXPECT_FALSE([bubble_window isVisible]);
- scoped_nsobject<NSWindow> other_window(
+ base::scoped_nsobject<NSWindow> other_window(
[[NSWindow alloc] initWithContentRect:NSMakeRect(500, 500, 500, 500)
styleMask:NSTitledWindowMask
backing:NSBackingStoreBuffered
@@ -163,7 +163,7 @@ TEST_F(BaseBubbleControllerTest, LionClickOutsideCloses) {
return;
// Closing the bubble will autorelease the controller.
- scoped_nsobject<BaseBubbleController> keep_alive([controller_ retain]);
+ base::scoped_nsobject<BaseBubbleController> keep_alive([controller_ retain]);
NSWindow* window = [controller_ window];
EXPECT_FALSE([window isVisible]);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm
index 1e0a3ab..2f56924 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm
index a0f2ef9..0a9650d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm
@@ -26,7 +26,7 @@ typedef std::pair<GURL,WindowOpenDisposition> OpenInfo;
// Oddly, we are our own delegate.
@interface FakeBookmarkBarController : BookmarkBarController {
@public
- scoped_nsobject<NSMutableArray> callbacks_;
+ base::scoped_nsobject<NSMutableArray> callbacks_;
std::vector<OpenInfo> opens_;
}
@end
@@ -98,15 +98,15 @@ class BookmarkBarBridgeTest : public CocoaProfileTest {
TEST_F(BookmarkBarBridgeTest, TestRedirect) {
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
- scoped_nsobject<NSView> parentView([[NSView alloc]
- initWithFrame:NSMakeRect(0,0,100,100)]);
- scoped_nsobject<NSView> webView([[NSView alloc]
- initWithFrame:NSMakeRect(0,0,100,100)]);
- scoped_nsobject<NSView> infoBarsView(
- [[NSView alloc] initWithFrame:NSMakeRect(0,0,100,100)]);
+ base::scoped_nsobject<NSView> parentView(
+ [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]);
+ base::scoped_nsobject<NSView> webView(
+ [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]);
+ base::scoped_nsobject<NSView> infoBarsView(
+ [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]);
- scoped_nsobject<FakeBookmarkBarController>
- controller([[FakeBookmarkBarController alloc] initWithBrowser:browser()]);
+ base::scoped_nsobject<FakeBookmarkBarController> controller(
+ [[FakeBookmarkBarController alloc] initWithBrowser:browser()]);
EXPECT_TRUE(controller.get());
scoped_ptr<BookmarkBarBridge> bridge(new BookmarkBarBridge(profile(),
controller.get(),
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
index 234f663..78ef62d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h
@@ -9,7 +9,7 @@
#include <map>
#import "base/mac/cocoa_protocols.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
@@ -183,13 +183,13 @@ willAnimateFromState:(BookmarkBar::State)oldState
std::map<int32,int64> menuTagMap_;
// Our bookmark buttons, ordered from L-->R.
- scoped_nsobject<NSMutableArray> buttons_;
+ base::scoped_nsobject<NSMutableArray> buttons_;
// The folder image so we can use one copy for all buttons
- scoped_nsobject<NSImage> folderImage_;
+ base::scoped_nsobject<NSImage> folderImage_;
// The default image, so we can use one copy for all buttons.
- scoped_nsobject<NSImage> defaultImage_;
+ base::scoped_nsobject<NSImage> defaultImage_;
// If the bar is disabled, we hide it and ignore show/hide commands.
// Set when using fullscreen mode.
@@ -206,7 +206,7 @@ willAnimateFromState:(BookmarkBar::State)oldState
id<ViewResizer> resizeDelegate_; // weak
// Logic for dealing with a click on a bookmark folder button.
- scoped_nsobject<BookmarkFolderTarget> folderTarget_;
+ base::scoped_nsobject<BookmarkFolderTarget> folderTarget_;
// A controller for a pop-up bookmark folder window (custom menu).
// This is not a scoped_nsobject because it owns itself (when its
@@ -224,17 +224,17 @@ willAnimateFromState:(BookmarkBar::State)oldState
NSRect originalImportBookmarksRect_; // Original, pre-resized field rect.
// "Other bookmarks" button on the right side.
- scoped_nsobject<BookmarkButton> otherBookmarksButton_;
+ base::scoped_nsobject<BookmarkButton> otherBookmarksButton_;
// "Apps" button to the right of "Other bookmarks".
- scoped_nsobject<BookmarkButton> appsPageShortcutButton_;
+ base::scoped_nsobject<BookmarkButton> appsPageShortcutButton_;
// When doing a drag, this is folder button "hovered over" which we
// may want to open after a short delay. There are cases where a
// mouse-enter can open a folder (e.g. if the menus are "active")
// but that doesn't use this variable or need a delay so "hover" is
// the wrong term.
- scoped_nsobject<BookmarkButton> hoverButton_;
+ base::scoped_nsobject<BookmarkButton> hoverButton_;
// We save the view width when we add bookmark buttons. This lets
// us avoid a rebuild until we've grown the window bigger than our
@@ -273,7 +273,8 @@ willAnimateFromState:(BookmarkBar::State)oldState
CGFloat insertionPos_;
// Controller responsible for all bookmark context menus.
- scoped_nsobject<BookmarkContextMenuCocoaController> contextMenuController_;
+ base::scoped_nsobject<BookmarkContextMenuCocoaController>
+ contextMenuController_;
}
@property(readonly, nonatomic) BookmarkBar::State currentState;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 3c43a37..d9f3890 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -1073,8 +1073,8 @@ void RecordAppLaunch(Profile* profile, GURL url) {
BookmarkButtonCell* cell = [self cellForBookmarkNode:node];
NSRect frame = [self frameForBookmarkButtonFromCell:cell xOffset:xOffset];
- scoped_nsobject<BookmarkButton>
- button([[BookmarkButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<BookmarkButton> button(
+ [[BookmarkButton alloc] initWithFrame:frame]);
DCHECK(button.get());
// [NSButton setCell:] warns to NOT use setCell: other than in the
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
index 7769928..0301ba3 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm
@@ -6,7 +6,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
@@ -30,8 +30,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
-#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "third_party/ocmock/gtest_support.h"
#include "ui/base/cocoa/animation_utils.h"
#include "ui/base/test/cocoa_test_event_utils.h"
#include "ui/base/theme_provider.h"
@@ -204,7 +204,7 @@
class FakeTheme : public ui::ThemeProvider {
public:
FakeTheme(NSColor* color) : color_(color) {}
- scoped_nsobject<NSColor> color_;
+ base::scoped_nsobject<NSColor> color_;
virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE {
return NULL;
@@ -292,8 +292,8 @@ namespace {
class BookmarkBarControllerTestBase : public CocoaProfileTest {
public:
- scoped_nsobject<NSView> parent_view_;
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<NSView> parent_view_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
virtual void SetUp() {
CocoaProfileTest::SetUp();
@@ -335,8 +335,8 @@ class BookmarkBarControllerTestBase : public CocoaProfileTest {
class BookmarkBarControllerTest : public BookmarkBarControllerTestBase {
public:
- scoped_nsobject<NSButtonCell> cell_;
- scoped_nsobject<BookmarkBarControllerNoOpen> bar_;
+ base::scoped_nsobject<NSButtonCell> cell_;
+ base::scoped_nsobject<BookmarkBarControllerNoOpen> bar_;
virtual void SetUp() {
BookmarkBarControllerTestBase::SetUp();
@@ -496,7 +496,7 @@ TEST_F(BookmarkBarControllerTest, StateChanges) {
// Make sure we're watching for frame change notifications.
TEST_F(BookmarkBarControllerTest, FrameChangeNotification) {
- scoped_nsobject<BookmarkBarControllerTogglePong> bar;
+ base::scoped_nsobject<BookmarkBarControllerTogglePong> bar;
bar.reset(
[[BookmarkBarControllerTogglePong alloc]
initWithBrowser:browser()
@@ -731,9 +731,10 @@ TEST_F(BookmarkBarControllerTest, OpenBookmark) {
GURL gurl("http://walla.walla.ding.dong.com");
scoped_ptr<BookmarkNode> node(new BookmarkNode(gurl));
- scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] init]);
+ base::scoped_nsobject<BookmarkButtonCell> cell(
+ [[BookmarkButtonCell alloc] init]);
[cell setBookmarkNode:node.get()];
- scoped_nsobject<BookmarkButton> button([[BookmarkButton alloc] init]);
+ base::scoped_nsobject<BookmarkButton> button([[BookmarkButton alloc] init]);
[button setCell:cell.get()];
[cell setRepresentedObject:[NSValue valueWithPointer:node.get()]];
@@ -830,7 +831,7 @@ TEST_F(BookmarkBarControllerTest, TestButtonLimits) {
// Make sure that each button we add marches to the right and does not
// overlap with the previous one.
TEST_F(BookmarkBarControllerTest, TestButtonMarch) {
- scoped_nsobject<NSMutableArray> cells([[NSMutableArray alloc] init]);
+ base::scoped_nsobject<NSMutableArray> cells([[NSMutableArray alloc] init]);
CGFloat widths[] = { 10, 10, 100, 10, 500, 500, 80000, 60000, 1, 345 };
for (unsigned int i = 0; i < arraysize(widths); i++) {
@@ -1168,7 +1169,7 @@ TEST_F(BookmarkBarControllerTest, TestClearOnDealloc) {
bookmark_utils::AddIfNotBookmarked(model, gurls[i], titles[i]);
// Get and retain the buttons so we can examine them after dealloc.
- scoped_nsobject<NSArray> buttons([[bar_ buttons] retain]);
+ base::scoped_nsobject<NSArray> buttons([[bar_ buttons] retain]);
EXPECT_EQ([buttons count], arraysize(titles));
// Make sure that everything is set.
@@ -1702,9 +1703,9 @@ class BookmarkBarControllerNotificationTest : public CocoaProfileTest {
// Do not add the bar to a window, yet.
}
- scoped_nsobject<NSView> parent_view_;
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
- scoped_nsobject<BookmarkBarControllerNotificationPong> bar_;
+ base::scoped_nsobject<NSView> parent_view_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<BookmarkBarControllerNotificationPong> bar_;
};
TEST_F(BookmarkBarControllerNotificationTest, DeregistersForNotifications) {
@@ -1740,7 +1741,7 @@ TEST_F(BookmarkBarControllerNotificationTest, DeregistersForNotifications) {
class BookmarkBarControllerDragDropTest : public BookmarkBarControllerTestBase {
public:
- scoped_nsobject<BookmarkBarControllerDragData> bar_;
+ base::scoped_nsobject<BookmarkBarControllerDragData> bar_;
virtual void SetUp() {
BookmarkBarControllerTestBase::SetUp();
@@ -1891,7 +1892,7 @@ TEST_F(BookmarkBarControllerDragDropTest, DragBookmarkData) {
// Gen up some dragging data.
const BookmarkNode* newNode = other->GetChild(2);
[bar_ setDragDataNode:newNode];
- scoped_nsobject<FakeDragInfo> dragInfo([[FakeDragInfo alloc] init]);
+ base::scoped_nsobject<FakeDragInfo> dragInfo([[FakeDragInfo alloc] init]);
[dragInfo setDropLocation:[targetButton center]];
[bar_ dragBookmarkData:(id<NSDraggingInfo>)dragInfo.get()];
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm
index 3b1eb0a..7418039 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "grit/ui_resources.h"
@@ -15,7 +15,7 @@ class BookmarkBarFolderButtonCellTest : public CocoaTest {
// Basic creation.
TEST_F(BookmarkBarFolderButtonCellTest, Create) {
- scoped_nsobject<BookmarkBarFolderButtonCell> cell;
+ base::scoped_nsobject<BookmarkBarFolderButtonCell> cell;
cell.reset([[BookmarkBarFolderButtonCell buttonCellForNode:nil
text:nil
image:nil
@@ -25,21 +25,21 @@ TEST_F(BookmarkBarFolderButtonCellTest, Create) {
TEST_F(BookmarkBarFolderButtonCellTest, FaviconPositioning) {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<NSButton> folder_view(
+ base::scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSButton> folder_view(
[[NSButton alloc] initWithFrame:frame]);
ASSERT_TRUE(view.get());
ASSERT_TRUE(folder_view.get());
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).CopyNSImage());
ASSERT_TRUE(image.get());
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
- scoped_nsobject<BookmarkBarFolderButtonCell> folder_cell(
+ base::scoped_nsobject<BookmarkBarFolderButtonCell> folder_cell(
[[BookmarkBarFolderButtonCell buttonCellForNode:nil
text:@"Testing"
image:image
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h
index 746552c..ec27fea 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
#import "ui/base/cocoa/tracking_area.h"
@@ -27,7 +27,7 @@ class Profile;
BookmarkButtonControllerProtocol> {
@private
// The button whose click opened us.
- scoped_nsobject<BookmarkButton> parentButton_;
+ base::scoped_nsobject<BookmarkButton> parentButton_;
// Bookmark bar folder controller chains are torn down in two ways:
// 1. Clicking "outside" the folder (see use of the NSEvent local event
@@ -57,13 +57,13 @@ class Profile;
// Our parent controller, if we are a nested folder, otherwise nil.
// Strong to insure the object lives as long as we need it.
- scoped_nsobject<BookmarkBarFolderController> parentController_;
+ base::scoped_nsobject<BookmarkBarFolderController> parentController_;
// The main bar controller from whence we or a parent sprang.
BookmarkBarController* barController_; // WEAK: It owns us.
// Our buttons. We do not have buttons for nested folders.
- scoped_nsobject<NSMutableArray> buttons_;
+ base::scoped_nsobject<NSMutableArray> buttons_;
// The scroll view that contains our main button view (below).
IBOutlet NSScrollView* scrollView_;
@@ -102,10 +102,10 @@ class Profile;
// We model hover state as a state machine with specific allowable
// transitions. |hoverState_| is the state of this machine at any
// given time.
- scoped_nsobject<BookmarkBarFolderHoverState> hoverState_;
+ base::scoped_nsobject<BookmarkBarFolderHoverState> hoverState_;
// Logic for dealing with a click on a bookmark folder button.
- scoped_nsobject<BookmarkFolderTarget> folderTarget_;
+ base::scoped_nsobject<BookmarkFolderTarget> folderTarget_;
// A controller for a pop-up bookmark folder window (custom menu).
// We (self) are the parentController_ for our folderController_.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm
index 3999e7a..2ada86e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -129,7 +129,7 @@ void DeleteBookmark(BookmarkButton* button, Profile* profile) {
class BookmarkBarFolderControllerTest : public CocoaProfileTest {
public:
- scoped_nsobject<BookmarkBarControllerChildFolderRedirect> bar_;
+ base::scoped_nsobject<BookmarkBarControllerChildFolderRedirect> bar_;
const BookmarkNode* folderA_; // Owned by model.
const BookmarkNode* longTitleNode_; // Owned by model.
@@ -217,7 +217,7 @@ class BookmarkBarFolderControllerTest : public CocoaProfileTest {
};
TEST_F(BookmarkBarFolderControllerTest, InitCreateAndDelete) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
// Make sure none of the buttons overlap, that all are inside
@@ -251,7 +251,7 @@ TEST_F(BookmarkBarFolderControllerTest, InitCreateAndDelete) {
// Make sure closing of the window releases the controller.
// (e.g. valgrind shouldn't complain if we do this).
TEST_F(BookmarkBarFolderControllerTest, ReleaseOnClose) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
EXPECT_TRUE(bbfc.get());
@@ -264,7 +264,7 @@ TEST_F(BookmarkBarFolderControllerTest, BasicPosition) {
EXPECT_TRUE(parentButton);
// If parent is a BookmarkBarController, grow down.
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset([[BookmarkBarFolderController alloc]
initWithParentButton:parentButton
parentController:nil
@@ -289,7 +289,7 @@ TEST_F(BookmarkBarFolderControllerTest, BasicPosition) {
EXPECT_LT(shifted.x, pt.x);
// If parent is a BookmarkBarFolderController, grow right.
- scoped_nsobject<BookmarkBarFolderController> bbfc2;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc2;
bbfc2.reset([[BookmarkBarFolderController alloc]
initWithParentButton:[[bbfc buttons] objectAtIndex:0]
parentController:bbfc.get()
@@ -323,7 +323,7 @@ TEST_F(BookmarkBarFolderControllerTest, PositionRightLeftRight) {
EXPECT_TRUE(parentButton);
// Open them all.
- scoped_nsobject<NSMutableArray> folder_controller_array;
+ base::scoped_nsobject<NSMutableArray> folder_controller_array;
folder_controller_array.reset([[NSMutableArray array] retain]);
for (i=0; i<count; i++) {
BookmarkBarFolderControllerNoLevel* bbfcl =
@@ -368,7 +368,7 @@ TEST_F(BookmarkBarFolderControllerTest, PositionRightLeftRight) {
}
TEST_F(BookmarkBarFolderControllerTest, DropDestination) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
EXPECT_TRUE(bbfc.get());
@@ -404,7 +404,7 @@ TEST_F(BookmarkBarFolderControllerTest, DropDestination) {
}
TEST_F(BookmarkBarFolderControllerTest, OpenFolder) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
EXPECT_TRUE(bbfc.get());
@@ -430,7 +430,7 @@ TEST_F(BookmarkBarFolderControllerTest, OpenFolder) {
}
TEST_F(BookmarkBarFolderControllerTest, DeleteOpenFolder) {
- scoped_nsobject<BookmarkBarFolderController> parent_controller(
+ base::scoped_nsobject<BookmarkBarFolderController> parent_controller(
SimpleBookmarkBarFolderController());
// Open a folder.
@@ -445,7 +445,7 @@ TEST_F(BookmarkBarFolderControllerTest, DeleteOpenFolder) {
}
TEST_F(BookmarkBarFolderControllerTest, ChildFolderCallbacks) {
- scoped_nsobject<BookmarkBarFolderControllerPong> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderControllerPong> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
EXPECT_TRUE(bbfc.get());
[bar_ setChildFolderDelegate:bbfc.get()];
@@ -463,7 +463,7 @@ TEST_F(BookmarkBarFolderControllerTest, ChildFolderCallbacks) {
// Make sure bookmark folders have variable widths.
TEST_F(BookmarkBarFolderControllerTest, ChildFolderWidth) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
bbfc.reset(SimpleBookmarkBarFolderController());
EXPECT_TRUE(bbfc.get());
@@ -482,7 +482,7 @@ TEST_F(BookmarkBarFolderControllerTest, ChildFolderWidth) {
// Simple scrolling tests.
// Currently flaky due to a changed definition of the correct menu boundaries.
TEST_F(BookmarkBarFolderControllerTest, DISABLED_SimpleScroll) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
NSRect screenFrame = [[NSScreen mainScreen] visibleFrame];
CGFloat screenHeight = NSHeight(screenFrame);
int nodecount = AddLotsOfNodes();
@@ -572,7 +572,7 @@ TEST_F(BookmarkBarFolderControllerTest, DISABLED_SimpleScroll) {
// Folder menu sizing and placement while deleting bookmarks
// and scrolling tests.
TEST_F(BookmarkBarFolderControllerTest, MenuPlacementWhileScrollingDeleting) {
- scoped_nsobject<BookmarkBarFolderController> bbfc;
+ base::scoped_nsobject<BookmarkBarFolderController> bbfc;
AddLotsOfNodes();
bbfc.reset(SimpleBookmarkBarFolderController());
[bbfc showWindow:bbfc.get()];
@@ -625,7 +625,7 @@ TEST_F(BookmarkBarFolderControllerTest, MenuPlacementWhileScrollingDeleting) {
// Make sure that we return the correct browser window.
TEST_F(BookmarkBarFolderControllerTest, BrowserWindow) {
- scoped_nsobject<BookmarkBarFolderController> controller(
+ base::scoped_nsobject<BookmarkBarFolderController> controller(
SimpleBookmarkBarFolderController());
EXPECT_EQ([bar_ browserWindow], [controller browserWindow]);
}
@@ -680,9 +680,9 @@ TEST_F(BookmarkBarFolderControllerTest, BrowserWindow) {
class BookmarkBarFolderControllerMenuTest : public CocoaProfileTest {
public:
- scoped_nsobject<NSView> parent_view_;
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
- scoped_nsobject<BookmarkBarController> bar_;
+ base::scoped_nsobject<NSView> parent_view_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<BookmarkBarController> bar_;
virtual void SetUp() {
CocoaProfileTest::SetUp();
@@ -1379,7 +1379,7 @@ TEST_F(BookmarkBarFolderControllerMenuTest, DragBookmarkData) {
// Pop open a folder.
BookmarkButton* button = [bar_ buttonWithTitleEqualTo:@"2f"];
- scoped_nsobject<BookmarkBarFolderControllerDragData> folderController;
+ base::scoped_nsobject<BookmarkBarFolderControllerDragData> folderController;
folderController.reset([[BookmarkBarFolderControllerDragData alloc]
initWithParentButton:button
parentController:nil
@@ -1392,7 +1392,7 @@ TEST_F(BookmarkBarFolderControllerMenuTest, DragBookmarkData) {
// Gen up some dragging data.
const BookmarkNode* newNode = other->GetChild(2);
[folderController setDragDataNode:newNode];
- scoped_nsobject<FakedDragInfo> dragInfo([[FakedDragInfo alloc] init]);
+ base::scoped_nsobject<FakedDragInfo> dragInfo([[FakedDragInfo alloc] init]);
[dragInfo setDropLocation:[targetButton top]];
[folderController dragBookmarkData:(id<NSDraggingInfo>)dragInfo.get()];
@@ -1438,7 +1438,7 @@ TEST_F(BookmarkBarFolderControllerMenuTest, DragBookmarkDataToTrash) {
// Pop open a folder.
BookmarkButton* button = [bar_ buttonWithTitleEqualTo:@"2f"];
- scoped_nsobject<BookmarkBarFolderControllerDragData> folderController;
+ base::scoped_nsobject<BookmarkBarFolderControllerDragData> folderController;
folderController.reset([[BookmarkBarFolderControllerDragData alloc]
initWithParentButton:button
parentController:nil
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h
index 20ea39e..8d8dea7 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
// Hover state machine. Encapsulates the hover state for
@@ -39,7 +39,7 @@
// Like normal menus, hovering over a folder button causes it to
// open. This variable is set when a hover is initiated (but has
// not necessarily fired yet).
- scoped_nsobject<BookmarkButton> hoverButton_;
+ base::scoped_nsobject<BookmarkButton> hoverButton_;
// We model hover state as a state machine with specific allowable
// transitions. |hoverState_| is the state of this machine at any
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
index bb39d7d..7c441be 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state_unittest.mm
@@ -19,14 +19,14 @@ class BookmarkBarFolderHoverStateTest : public CocoaTest {
// these specific state transitions.
TEST_F(BookmarkBarFolderHoverStateTest, HoverState) {
base::MessageLoopForUI message_loop;
- scoped_nsobject<BookmarkBarFolderHoverState> bbfhs;
+ base::scoped_nsobject<BookmarkBarFolderHoverState> bbfhs;
bbfhs.reset([[BookmarkBarFolderHoverState alloc] init]);
// Initial state.
EXPECT_FALSE([bbfhs hoverButton]);
ASSERT_EQ(kHoverStateClosed, [bbfhs hoverState]);
- scoped_nsobject<BookmarkButton> button;
+ base::scoped_nsobject<BookmarkButton> button;
button.reset([[BookmarkButton alloc] initWithFrame:NSMakeRect(0, 0, 20, 20)]);
// Test transition from closed to opening.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm
index 0550eab..b48b86a 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -133,9 +133,9 @@ class BookmarkBarFolderViewTest : public CocoaProfileTest {
return [mock_button retain];
}
- scoped_nsobject<id> mock_controller_;
- scoped_nsobject<BookmarkBarFolderView> view_;
- scoped_nsobject<id> mock_button_;
+ base::scoped_nsobject<id> mock_controller_;
+ base::scoped_nsobject<BookmarkBarFolderView> view_;
+ base::scoped_nsobject<id> mock_button_;
};
TEST_F(BookmarkBarFolderViewTest, BookmarkButtonDragAndDrop) {
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h
index 21115db..285bc25 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_WINDOW_H_
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// Window for a bookmark folder "menu". This menu pops up when you
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
index 06a6112..3d6a25b 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
@@ -5,11 +5,11 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h"
#import "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
-#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
+#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
using bookmarks::kBookmarkBarMenuCornerRadius;
@@ -60,13 +60,13 @@ using bookmarks::kBookmarkBarMenuCornerRadius;
NSColor* endColor =
[startColor gtm_colorAdjustedFor:GTMColorationLightPenumbra faded:YES];
- scoped_nsobject<NSGradient> gradient(
- [[NSGradient alloc] initWithColorsAndLocations:startColor, 0.0,
- midColor, 0.25,
- endColor, 0.5,
- midColor, 0.75,
- startColor, 1.0,
- nil]);
+ base::scoped_nsobject<NSGradient> gradient(
+ [[NSGradient alloc] initWithColorsAndLocations:startColor, 0.0,
+ midColor, 0.25,
+ endColor, 0.5,
+ midColor, 0.75,
+ startColor, 1.0,
+ nil]);
[gradient drawInBezierPath:bezier angle:0.0];
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window_unittest.mm
index d1d1005..9fb9b52 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window_unittest.mm
@@ -12,7 +12,7 @@ class BookmarkBarFolderWindowTest : public CocoaTest {
};
TEST_F(BookmarkBarFolderWindowTest, Borderless) {
- scoped_nsobject<BookmarkBarFolderWindow> window_;
+ base::scoped_nsobject<BookmarkBarFolderWindow> window_;
window_.reset([[BookmarkBarFolderWindow alloc]
initWithContentRect:NSMakeRect(0,0,20,20)
styleMask:0
@@ -29,8 +29,8 @@ class BookmarkBarFolderWindowContentViewTest : public CocoaTest {
initWithFrame:NSMakeRect(0, 0, 100, 100)]);
[[test_window() contentView] addSubview:view_.get()];
}
- scoped_nsobject<BookmarkBarFolderWindowContentView> view_;
- scoped_nsobject<BookmarkBarFolderWindowScrollView> scroll_view_;
+ base::scoped_nsobject<BookmarkBarFolderWindowContentView> view_;
+ base::scoped_nsobject<BookmarkBarFolderWindowScrollView> scroll_view_;
};
TEST_VIEW(BookmarkBarFolderWindowContentViewTest, view_);
@@ -43,7 +43,7 @@ class BookmarkBarFolderWindowScrollViewTest : public CocoaTest {
initWithFrame:NSMakeRect(0, 0, 100, 100)]);
[[test_window() contentView] addSubview:scroll_view_.get()];
}
- scoped_nsobject<BookmarkBarFolderWindowScrollView> scroll_view_;
+ base::scoped_nsobject<BookmarkBarFolderWindowScrollView> scroll_view_;
};
TEST_VIEW(BookmarkBarFolderWindowScrollViewTest, scroll_view_);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
index e8208970..f7a984b 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
@@ -94,14 +94,14 @@ class BookmarkBarToolbarViewTest : public CocoaTest {
BookmarkBarToolbarViewTest() {
controller_.reset([[DrawDetachedBarFakeController alloc] init]);
NSRect frame = NSMakeRect(0, 0, 400, 40);
- scoped_nsobject<BookmarkBarToolbarView> view(
+ base::scoped_nsobject<BookmarkBarToolbarView> view(
[[BookmarkBarToolbarView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
[view_ setController:controller_.get()];
}
- scoped_nsobject<DrawDetachedBarFakeController> controller_;
+ base::scoped_nsobject<DrawDetachedBarFakeController> controller_;
BookmarkBarToolbarView* view_;
};
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm
index 902bb7f..8456dfa 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -201,7 +201,7 @@ class BookmarkBarViewTest : public CocoaProfileTest {
view_.reset([[BookmarkBarView alloc] init]);
}
- scoped_nsobject<BookmarkBarView> view_;
+ base::scoped_nsobject<BookmarkBarView> view_;
};
TEST_F(BookmarkBarViewTest, CanDragWindow) {
@@ -209,8 +209,8 @@ TEST_F(BookmarkBarViewTest, CanDragWindow) {
}
TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDrop) {
- scoped_nsobject<FakeBookmarkDraggingInfo>
- info([[FakeBookmarkDraggingInfo alloc] init]);
+ base::scoped_nsobject<FakeBookmarkDraggingInfo> info(
+ [[FakeBookmarkDraggingInfo alloc] init]);
[view_ setController:info.get()];
[info reset];
@@ -222,12 +222,13 @@ TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDrop) {
ASCIIToUTF16("Test Bookmark"),
GURL("http://www.exmaple.com"));
- scoped_nsobject<BookmarkButtonCell> button_cell(
+ base::scoped_nsobject<BookmarkButtonCell> button_cell(
[[BookmarkButtonCell buttonCellForNode:node
text:nil
image:nil
menuController:nil] retain]);
- scoped_nsobject<BookmarkButton> dragged_button([[BookmarkButton alloc] init]);
+ base::scoped_nsobject<BookmarkButton> dragged_button(
+ [[BookmarkButton alloc] init]);
[dragged_button setCell:button_cell];
[info setDraggingSource:dragged_button.get()];
[info setDragDataType:kBookmarkButtonDragType];
@@ -243,8 +244,8 @@ TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDrop) {
// When dragging bookmarks across profiles, we should always copy, never move.
TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDropAcrossProfiles) {
- scoped_nsobject<FakeBookmarkDraggingInfo>
- info([[FakeBookmarkDraggingInfo alloc] init]);
+ base::scoped_nsobject<FakeBookmarkDraggingInfo> info(
+ [[FakeBookmarkDraggingInfo alloc] init]);
[view_ setController:info.get()];
[info reset];
@@ -263,12 +264,13 @@ TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDropAcrossProfiles) {
ASCIIToUTF16("Test Bookmark"),
GURL("http://www.exmaple.com"));
- scoped_nsobject<BookmarkButtonCell> button_cell(
+ base::scoped_nsobject<BookmarkButtonCell> button_cell(
[[BookmarkButtonCell buttonCellForNode:node
text:nil
image:nil
menuController:nil] retain]);
- scoped_nsobject<BookmarkButton> dragged_button([[BookmarkButton alloc] init]);
+ base::scoped_nsobject<BookmarkButton> dragged_button(
+ [[BookmarkButton alloc] init]);
[dragged_button setCell:button_cell];
[info setDraggingSource:dragged_button.get()];
[info setDragDataType:kBookmarkButtonDragType];
@@ -283,8 +285,8 @@ TEST_F(BookmarkBarViewTest, BookmarkButtonDragAndDropAcrossProfiles) {
}
TEST_F(BookmarkBarViewTest, URLDragAndDrop) {
- scoped_nsobject<FakeBookmarkDraggingInfo>
- info([[FakeBookmarkDraggingInfo alloc] init]);
+ base::scoped_nsobject<FakeBookmarkDraggingInfo> info(
+ [[FakeBookmarkDraggingInfo alloc] init]);
[view_ setController:info.get()];
[info reset];
@@ -301,12 +303,13 @@ TEST_F(BookmarkBarViewTest, URLDragAndDrop) {
}
TEST_F(BookmarkBarViewTest, BookmarkButtonDropIndicator) {
- scoped_nsobject<FakeBookmarkDraggingInfo>
- info([[FakeBookmarkDraggingInfo alloc] init]);
+ base::scoped_nsobject<FakeBookmarkDraggingInfo> info(
+ [[FakeBookmarkDraggingInfo alloc] init]);
[view_ setController:info.get()];
[info reset];
- scoped_nsobject<BookmarkButton> dragged_button([[BookmarkButton alloc] init]);
+ base::scoped_nsobject<BookmarkButton> dragged_button(
+ [[BookmarkButton alloc] init]);
[info setDraggingSource:dragged_button.get()];
[info setDragDataType:kBookmarkButtonDragType];
EXPECT_FALSE([info draggingEnteredCalled]);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
index 5cad07e..1405f7c 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -252,8 +252,8 @@ TEST_F(BookmarkBubbleControllerTest, TestClose) {
GURL("http://www.google.com"));
EXPECT_EQ(edits_, 0);
- scoped_nsobject<BookmarkPulseObserver> observer([[BookmarkPulseObserver alloc]
- init]);
+ base::scoped_nsobject<BookmarkPulseObserver> observer(
+ [[BookmarkPulseObserver alloc] init]);
EXPECT_EQ([observer notifications], 0);
BookmarkBubbleController* controller = ControllerForNode(node);
EXPECT_TRUE(controller);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
index 876ac6d..92f6b89 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm
@@ -7,7 +7,7 @@
#include <cmath>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h"
@@ -415,10 +415,11 @@ BookmarkButton* gDraggedButton = nil; // Weak
// if the source view is clipped. Fortunately, we don't display clipped
// bookmark buttons.
[self lockFocus];
- scoped_nsobject<NSBitmapImageRep>
- bitmap([[NSBitmapImageRep alloc] initWithFocusedViewRect:bounds]);
+ base::scoped_nsobject<NSBitmapImageRep> bitmap(
+ [[NSBitmapImageRep alloc] initWithFocusedViewRect:bounds]);
[self unlockFocus];
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:[bitmap size]]);
+ base::scoped_nsobject<NSImage> image(
+ [[NSImage alloc] initWithSize:[bitmap size]]);
[image addRepresentation:bitmap];
// Make an autoreleased |NSImage|, which will be returned, and draw into it.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
index 32b13f4..0a4b7da 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
@@ -30,10 +30,10 @@ class BookmarkNode;
BOOL drawFolderArrow_;
// Arrow for folders
- scoped_nsobject<NSImage> arrowImage_;
+ base::scoped_nsobject<NSImage> arrowImage_;
// Text color for title.
- scoped_nsobject<NSColor> textColor_;
+ base::scoped_nsobject<NSColor> textColor_;
}
@property(nonatomic, readwrite, assign) const BookmarkNode* bookmarkNode;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
index 6aaab33..a377295 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -215,7 +215,8 @@ const int kHierarchyButtonXMargin = 4;
// We must reapply the text color after any setTitle: call
- (void)applyTextColor {
- scoped_nsobject<NSMutableParagraphStyle> style([NSMutableParagraphStyle new]);
+ base::scoped_nsobject<NSMutableParagraphStyle> style(
+ [NSMutableParagraphStyle new]);
[style setAlignment:NSLeftTextAlignment];
NSDictionary* dict = [NSDictionary
dictionaryWithObjectsAndKeys:textColor_,
@@ -224,9 +225,8 @@ const int kHierarchyButtonXMargin = 4;
style.get(), NSParagraphStyleAttributeName,
[NSNumber numberWithFloat:0.2], NSKernAttributeName,
nil];
- scoped_nsobject<NSAttributedString> ats([[NSAttributedString alloc]
- initWithString:[self title]
- attributes:dict]);
+ base::scoped_nsobject<NSAttributedString> ats(
+ [[NSAttributedString alloc] initWithString:[self title] attributes:dict]);
[self setAttributedTitle:ats.get()];
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
index baeccef..db26ae7 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -43,8 +43,8 @@ class BookmarkButtonCellTest : public CocoaProfileTest {
// Make sure it's not totally bogus
TEST_F(BookmarkButtonCellTest, SizeForBounds) {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
[view setCell:cell.get()];
[[test_window() contentView] addSubview:view];
@@ -58,14 +58,14 @@ TEST_F(BookmarkButtonCellTest, SizeForBounds) {
// Make sure icon-only buttons are squeezed tightly.
TEST_F(BookmarkButtonCellTest, IconOnlySqueeze) {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
[view setCell:cell.get()];
[[test_window() contentView] addSubview:view];
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).CopyNSImage());
EXPECT_TRUE(image.get());
@@ -87,7 +87,7 @@ TEST_F(BookmarkButtonCellTest, IconOnlySqueeze) {
// Make sure the default from the base class is overridden.
TEST_F(BookmarkButtonCellTest, MouseEnterStuff) {
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
// Setting the menu should have no affect since we either share or
// dynamically compose the menu given a node.
@@ -106,7 +106,7 @@ TEST_F(BookmarkButtonCellTest, MouseEnterStuff) {
TEST_F(BookmarkButtonCellTest, BookmarkNode) {
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
const BookmarkNode* node = model->bookmark_bar_node();
@@ -119,11 +119,11 @@ TEST_F(BookmarkButtonCellTest, BookmarkNode) {
}
TEST_F(BookmarkButtonCellTest, BookmarkMouseForwarding) {
- scoped_nsobject<BookmarkButtonCell> cell(
+ base::scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
- scoped_nsobject<ButtonRemembersMouseEnterExit>
- button([[ButtonRemembersMouseEnterExit alloc]
- initWithFrame:NSMakeRect(0,0,50,50)]);
+ base::scoped_nsobject<ButtonRemembersMouseEnterExit> button(
+ [[ButtonRemembersMouseEnterExit alloc]
+ initWithFrame:NSMakeRect(0, 0, 50, 50)]);
[button setCell:cell.get()];
EXPECT_EQ(0, button.get()->enters_);
EXPECT_EQ(0, button.get()->exits_);
@@ -147,7 +147,8 @@ TEST_F(BookmarkButtonCellTest, BookmarkMouseForwarding) {
// Confirms a cell created in a nib is initialized properly
TEST_F(BookmarkButtonCellTest, Awake) {
- scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] init]);
+ base::scoped_nsobject<BookmarkButtonCell> cell(
+ [[BookmarkButtonCell alloc] init]);
[cell awakeFromNib];
EXPECT_EQ(NSLeftTextAlignment, [cell alignment]);
}
@@ -159,11 +160,11 @@ TEST_F(BookmarkButtonCellTest, FolderArrow) {
const BookmarkNode* node = model->AddURL(bar, bar->child_count(),
ASCIIToUTF16("title"),
GURL("http://www.google.com"));
- scoped_nsobject<BookmarkButtonCell> cell(
- [[BookmarkButtonCell alloc] initForNode:node
- text:@"small"
- image:nil
- menuController:nil]);
+ base::scoped_nsobject<BookmarkButtonCell> cell(
+ [[BookmarkButtonCell alloc] initForNode:node
+ text:@"small"
+ image:nil
+ menuController:nil]);
EXPECT_TRUE(cell.get());
NSSize size = [cell cellSize];
@@ -184,9 +185,9 @@ TEST_F(BookmarkButtonCellTest, VerticalTextOffset) {
ASCIIToUTF16("title"),
GURL("http://www.google.com"));
- scoped_nsobject<GradientButtonCell> gradient_cell(
+ base::scoped_nsobject<GradientButtonCell> gradient_cell(
[[GradientButtonCell alloc] initTextCell:@"Testing"]);
- scoped_nsobject<BookmarkButtonCell> bookmark_cell(
+ base::scoped_nsobject<BookmarkButtonCell> bookmark_cell(
[[BookmarkButtonCell alloc] initForNode:node
text:@"small"
image:nil
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
index 6e0b5d3..a6cb9d2 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -65,14 +65,14 @@ class BookmarkButtonTest : public CocoaProfileTest {
// Make sure nothing leaks
TEST_F(BookmarkButtonTest, Create) {
- scoped_nsobject<BookmarkButton> button;
+ base::scoped_nsobject<BookmarkButton> button;
button.reset([[BookmarkButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
}
// Test folder and empty node queries.
TEST_F(BookmarkButtonTest, FolderAndEmptyOrNot) {
- scoped_nsobject<BookmarkButton> button;
- scoped_nsobject<BookmarkButtonCell> cell;
+ base::scoped_nsobject<BookmarkButton> button;
+ base::scoped_nsobject<BookmarkButtonCell> cell;
button.reset([[BookmarkButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
cell.reset([[BookmarkButtonCell alloc] initTextCell:@"hi mom"]);
@@ -107,10 +107,10 @@ TEST_F(BookmarkButtonTest, MouseEnterExitRedirect) {
cocoa_test_event_utils::MouseEventAtPoint(NSMakePoint(10,10),
NSMouseMoved,
0);
- scoped_nsobject<BookmarkButton> button;
- scoped_nsobject<BookmarkButtonCell> cell;
- scoped_nsobject<FakeButtonDelegate>
- delegate([[FakeButtonDelegate alloc] init]);
+ base::scoped_nsobject<BookmarkButton> button;
+ base::scoped_nsobject<BookmarkButtonCell> cell;
+ base::scoped_nsobject<FakeButtonDelegate> delegate(
+ [[FakeButtonDelegate alloc] init]);
button.reset([[BookmarkButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
cell.reset([[BookmarkButtonCell alloc] initTextCell:@"hi mom"]);
[button setCell:cell];
@@ -130,10 +130,10 @@ TEST_F(BookmarkButtonTest, MouseEnterExitRedirect) {
}
TEST_F(BookmarkButtonTest, DragToTrash) {
- scoped_nsobject<BookmarkButton> button;
- scoped_nsobject<BookmarkButtonCell> cell;
- scoped_nsobject<FakeButtonDelegate>
- delegate([[FakeButtonDelegate alloc] init]);
+ base::scoped_nsobject<BookmarkButton> button;
+ base::scoped_nsobject<BookmarkButtonCell> cell;
+ base::scoped_nsobject<FakeButtonDelegate> delegate(
+ [[FakeButtonDelegate alloc] init]);
button.reset([[BookmarkButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
cell.reset([[BookmarkButtonCell alloc] initTextCell:@"hi mom"]);
[button setCell:cell];
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.h
index 7f4828c..61a49f0 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
@class BookmarkBarController;
@@ -41,7 +41,7 @@ class BookmarkNode;
// Controller responsible for creating a Cocoa NSMenu from the cross-platform
// SimpleMenuModel owned by the |bookmarkContextMenuController_|.
- scoped_nsobject<MenuController> menuController_;
+ base::scoped_nsobject<MenuController> menuController_;
}
// Initializes the BookmarkContextMenuCocoaController for the given bookmark
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
index 3c1889d..c69a17d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm
@@ -9,7 +9,7 @@
#include <cmath>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
@@ -69,9 +69,8 @@ void DrawTruncatedTitle(NSAttributedString* title, NSRect frame) {
NSColor* color = [NSColor blackColor];
NSColor* alpha_color = [color colorWithAlphaComponent:0.0];
- scoped_nsobject<NSGradient> mask(
- [[NSGradient alloc] initWithStartingColor:color
- endingColor:alpha_color]);
+ base::scoped_nsobject<NSGradient> mask(
+ [[NSGradient alloc] initWithStartingColor:color endingColor:alpha_color]);
// Draw the gradient mask.
CGContextSetBlendMode(context, kCGBlendModeDestinationIn);
[mask drawFromPoint:NSMakePoint(NSMaxX(frame) - gradient_width,
@@ -101,9 +100,8 @@ NSImage* DragImageForBookmark(NSImage* favicon, const string16& title) {
[NSDictionary dictionaryWithObject:[NSFont systemFontOfSize:
[NSFont smallSystemFontSize]]
forKey:NSFontAttributeName];
- scoped_nsobject<NSAttributedString> rich_title(
- [[NSAttributedString alloc] initWithString:ns_title
- attributes:attrs]);
+ base::scoped_nsobject<NSAttributedString> rich_title(
+ [[NSAttributedString alloc] initWithString:ns_title attributes:attrs]);
// Set up sizes and locations for rendering.
const CGFloat kIconMargin = 2.0; // Gap between icon and text.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h
index e8107ea..1a60827 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h"
@@ -41,10 +41,10 @@ class BookmarkModel;
BOOL creatingNewFolders_; // True while in createNewFolders.
// An array of BookmarkFolderInfo where each item describes a folder in the
// BookmarkNode structure.
- scoped_nsobject<NSArray> folderTreeArray_;
+ base::scoped_nsobject<NSArray> folderTreeArray_;
// Bound to the table view giving a path to the current selections, of which
// there should only ever be one.
- scoped_nsobject<NSArray> tableSelectionPaths_;
+ base::scoped_nsobject<NSArray> tableSelectionPaths_;
// C++ bridge object that observes the BookmarkModel for me.
scoped_ptr<BookmarkEditorBaseControllerBridge> observer_;
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
index c66f651..1aeeaa8 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h
index da3ed89..abf67cb 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h
@@ -13,7 +13,7 @@
@interface BookmarkEditorController : BookmarkEditorBaseController {
@private
const BookmarkNode* node_; // weak; owned by the model
- scoped_nsobject<NSString> initialUrl_;
+ base::scoped_nsobject<NSString> initialUrl_;
NSString* displayURL_; // Bound to a text field in the dialog.
IBOutlet NSTextField* urlField_;
IBOutlet NSTextField* nameTextField_;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm
index 2ca188d..c6019a9 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm
@@ -57,8 +57,8 @@ TEST_F(BookmarkFolderTargetTest, StartWithNothing) {
// Make sure we get an addNew
[[controller expect] addNewFolderControllerWithParentButton:sender];
- scoped_nsobject<BookmarkFolderTarget> target(
- [[BookmarkFolderTarget alloc] initWithController:controller]);
+ base::scoped_nsobject<BookmarkFolderTarget> target(
+ [[BookmarkFolderTarget alloc] initWithController:controller]);
[target openBookmarkFolderFromButton:sender];
EXPECT_OCMOCK_VERIFY(controller);
@@ -82,7 +82,7 @@ TEST_F(BookmarkFolderTargetTest, ReopenSameFolder) {
// any subfolders).
[[controller expect] closeBookmarkFolder:controller];
- scoped_nsobject<BookmarkFolderTarget> target(
+ base::scoped_nsobject<BookmarkFolderTarget> target(
[[BookmarkFolderTarget alloc] initWithController:controller]);
[target openBookmarkFolderFromButton:sender];
@@ -111,8 +111,8 @@ TEST_F(BookmarkFolderTargetTest, ReopenNotSame) {
// close and open.
[[controller expect] addNewFolderControllerWithParentButton:sender];
- scoped_nsobject<BookmarkFolderTarget> target(
- [[BookmarkFolderTarget alloc] initWithController:controller]);
+ base::scoped_nsobject<BookmarkFolderTarget> target(
+ [[BookmarkFolderTarget alloc] initWithController:controller]);
[target openBookmarkFolderFromButton:sender];
EXPECT_OCMOCK_VERIFY(controller);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h
index 747a480..1d8fc04 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h
@@ -22,7 +22,7 @@
#include <map>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#import "chrome/browser/ui/cocoa/main_menu_item.h"
@@ -139,7 +139,7 @@ class BookmarkMenuBridge : public BookmarkModelObserver,
BookmarkMenuCocoaController* controller_; // strong
// The folder image so we can use one copy for all.
- scoped_nsobject<NSImage> folder_image_;
+ base::scoped_nsobject<NSImage> folder_image_;
// In order to appropriately update items in the bookmark menu, without
// forcing a rebuild, map the model's nodes to menu items.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm
index 73bc86d..092df71 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm
@@ -4,7 +4,7 @@
#import <AppKit/AppKit.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm
index fddc7fb..e4b7b4e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -76,7 +76,7 @@ class BookmarkMenuCocoaControllerTest : public CocoaProfileTest {
FakeBookmarkMenuController* controller() { return controller_.get(); }
private:
- scoped_nsobject<FakeBookmarkMenuController> controller_;
+ base::scoped_nsobject<FakeBookmarkMenuController> controller_;
};
TEST_F(BookmarkMenuCocoaControllerTest, TestOpenItem) {
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h
index e6bc619..cbafd35 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h
@@ -25,7 +25,7 @@
#include "base/basictypes.h"
#include "base/mac/scoped_block.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm
index c781af2..c508ebe 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h
index d7009dd..e5a603e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -31,7 +31,7 @@ class BookmarkModelObserverForCocoa;
const BookmarkNode* parent_;
int newIndex_;
- scoped_nsobject<NSString> initialName_;
+ base::scoped_nsobject<NSString> initialName_;
// Ping me when things change out from under us.
scoped_ptr<BookmarkModelObserverForCocoa> observer_;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm
index eb78e7a..d8a023d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h"
@@ -23,12 +23,11 @@ TEST_F(BookmarkNameFolderControllerTest, AddNew) {
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- parent:parent
- newIndex:0]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ parent:parent
+ newIndex:0]);
[controller window]; // force nib load
// Do nothing.
@@ -59,12 +58,11 @@ TEST_F(BookmarkNameFolderControllerTest, AddNewWithSibling) {
GURL("http://www.google.com"));
EXPECT_EQ(2, parent->child_count());
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- parent:parent
- newIndex:1]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ parent:parent
+ newIndex:1]);
[controller window]; // force nib load
// Add a new folder.
@@ -83,12 +81,11 @@ TEST_F(BookmarkNameFolderControllerTest, AddNewDefaultName) {
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- parent:parent
- newIndex:0]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ parent:parent
+ newIndex:0]);
[controller window]; // force nib load
@@ -104,12 +101,11 @@ TEST_F(BookmarkNameFolderControllerTest, AddNewBlankName) {
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- parent:parent
- newIndex:0]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ parent:parent
+ newIndex:0]);
[controller window]; // force nib load
// Change the name to blank, click OK.
@@ -128,11 +124,10 @@ TEST_F(BookmarkNameFolderControllerTest, Rename) {
// Rename the folder by creating a controller that originates from
// the node.
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- node:folder]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ node:folder]);
[controller window]; // force nib load
EXPECT_NSEQ(@"folder", [controller folderName]);
@@ -148,12 +143,11 @@ TEST_F(BookmarkNameFolderControllerTest, EditAndConfirmOKButton) {
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
- scoped_nsobject<BookmarkNameFolderController>
- controller([[BookmarkNameFolderController alloc]
- initWithParentWindow:test_window()
- profile:profile()
- parent:parent
- newIndex:0]);
+ base::scoped_nsobject<BookmarkNameFolderController> controller(
+ [[BookmarkNameFolderController alloc] initWithParentWindow:test_window()
+ profile:profile()
+ parent:parent
+ newIndex:0]);
[controller window]; // force nib load
// We start enabled since the default "New Folder" is added for us.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell_unittest.mm
index 60f6deb..7450904 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_tree_browser_cell.h"
#include "testing/platform_test.h"
@@ -20,8 +20,8 @@ class BookmarkTreeBrowserCellTest : public PlatformTest {
}
scoped_ptr<BookmarkNode> bookmarkNodeMock_;
- scoped_nsobject<NSMatrix> matrixMock_;
- scoped_nsobject<NSObject> targetMock_;
+ base::scoped_nsobject<NSMatrix> matrixMock_;
+ base::scoped_nsobject<NSObject> targetMock_;
};
TEST_F(BookmarkTreeBrowserCellTest, BasicAllocDealloc) {
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
index a72d6ee..f61ccad 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
@@ -7,7 +7,7 @@
#import <AppKit/AppKit.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
@class AvatarMenuBubbleController;
@@ -36,10 +36,10 @@ class ThemeProvider;
__weak AvatarMenuBubbleController* menuController_;
// The avatar button.
- scoped_nsobject<NSButton> button_;
+ base::scoped_nsobject<NSButton> button_;
// The managed user avatar label. Only used for managed user profiles.
- scoped_nsobject<NSButton> labelButton_;
+ base::scoped_nsobject<NSButton> labelButton_;
}
// The avatar button view.
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index 52049b0..ab62229 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -98,8 +98,9 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
if ((self = [super init])) {
browser_ = browser;
- scoped_nsobject<NSView> container([[NSView alloc] initWithFrame:NSMakeRect(
- 0, 0, profiles::kAvatarIconWidth, profiles::kAvatarIconHeight)]);
+ base::scoped_nsobject<NSView> container(
+ [[NSView alloc] initWithFrame:NSMakeRect(
+ 0, 0, profiles::kAvatarIconWidth, profiles::kAvatarIconHeight)]);
[self setView:container];
button_.reset([[NSButton alloc] initWithFrame:NSMakeRect(
0, 0, profiles::kAvatarIconWidth, profiles::kAvatarIconHeight)]);
@@ -258,7 +259,7 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
- (NSImage*)compositeImageWithShadow:(NSImage*)image {
gfx::ScopedNSGraphicsContextSaveGState scopedGState;
- scoped_nsobject<NSImage> destination(
+ base::scoped_nsobject<NSImage> destination(
[[NSImage alloc] initWithSize:[image size]]);
NSRect destRect = NSZeroRect;
@@ -266,7 +267,7 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
[destination lockFocus];
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowColor:[NSColor colorWithCalibratedWhite:0.0
alpha:0.75]];
[shadow.get() setShadowOffset:NSMakeSize(0, 0)];
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm
index 83001ee..43b7c3b 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h"
@@ -35,7 +35,7 @@ class AvatarButtonControllerTest : public CocoaProfileTest {
AvatarButtonController* controller() { return controller_.get(); }
private:
- scoped_nsobject<AvatarButtonController> controller_;
+ base::scoped_nsobject<AvatarButtonController> controller_;
};
TEST_F(AvatarButtonControllerTest, AddRemoveProfiles) {
@@ -89,7 +89,7 @@ TEST_F(AvatarButtonControllerTest, ManagedUserLabel) {
// Build a new controller to check if it is initialized correctly for a
// managed user profile.
- scoped_nsobject<AvatarButtonController> controller(
+ base::scoped_nsobject<AvatarButtonController> controller(
[[AvatarButtonController alloc] initWithBrowser:browser()]);
EXPECT_TRUE([controller labelButtonView]);
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h
index f3f77f4..b0eb8f0 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#import "ui/base/cocoa/tracking_area.h"
@@ -23,7 +23,7 @@ class Browser;
scoped_ptr<AvatarMenuModel> model_;
// Array of the below view controllers.
- scoped_nsobject<NSMutableArray> items_;
+ base::scoped_nsobject<NSMutableArray> items_;
// Is set to true if the managed user has clicked on Switch Users.
BOOL expanded_;
@@ -65,7 +65,7 @@ class Browser;
// The animation showing the edit link, which is run after the user has
// dwelled over the item for a short delay.
- scoped_nsobject<NSAnimation> linkAnimation_;
+ base::scoped_nsobject<NSAnimation> linkAnimation_;
// Instance variables that back the outlets.
__weak NSImageView* iconView_;
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
index 65cff17..4514695 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
@@ -110,7 +110,7 @@ const CGFloat kManagedUserSpacing = 26.0;
// Use an arbitrary height because it will reflect the size of the content.
NSRect contentRect = NSMakeRect(0, 0, kBubbleMinWidth, 150);
// Create an empty window into which content is placed.
- scoped_nsobject<InfoBubbleWindow> window(
+ base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -302,10 +302,11 @@ const CGFloat kManagedUserSpacing = 26.0;
}
- (NSView*)configureManagedUserInformation:(CGFloat)width {
- scoped_nsobject<NSView> container([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> container(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
// Add the limited user icon on the left side of the information TextView.
- scoped_nsobject<NSImageView> iconView(
+ base::scoped_nsobject<NSImageView> iconView(
[[NSImageView alloc] initWithFrame:NSMakeRect(5, 0, 16, 16)]);
[iconView setImage:model_->GetManagedUserIcon().ToNSImage()];
[container addSubview:iconView];
@@ -314,9 +315,9 @@ const CGFloat kManagedUserSpacing = 26.0;
base::SysUTF16ToNSString(model_->GetManagedUserInformation());
NSDictionary* attributes =
@{ NSFontAttributeName : [NSFont labelFontOfSize:12] };
- scoped_nsobject<NSAttributedString> attrString(
+ base::scoped_nsobject<NSAttributedString> attrString(
[[NSAttributedString alloc] initWithString:info attributes:attributes]);
- scoped_nsobject<NSTextView> label(
+ base::scoped_nsobject<NSTextView> label(
[[NSTextView alloc] initWithFrame:NSMakeRect(
kManagedUserSpacing, 0, width - kManagedUserSpacing - 5, 0)]);
[[label textStorage] setAttributedString:attrString];
@@ -333,12 +334,11 @@ const CGFloat kManagedUserSpacing = 26.0;
- (NSButton*)configureNewUserButton:(CGFloat)yOffset
updateWidthAdjust:(CGFloat*)widthAdjust {
- scoped_nsobject<NSButton> newButton(
- [[NSButton alloc] initWithFrame:NSMakeRect(
- kLabelInset, yOffset, kBubbleMinWidth - kLabelInset, 16)]);
- scoped_nsobject<HyperlinkButtonCell> buttonCell(
+ base::scoped_nsobject<NSButton> newButton([[NSButton alloc] initWithFrame:
+ NSMakeRect(kLabelInset, yOffset, kBubbleMinWidth - kLabelInset, 16)]);
+ base::scoped_nsobject<HyperlinkButtonCell> buttonCell(
[[HyperlinkButtonCell alloc] initTextCell:
- l10n_util::GetNSString(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)]);
+ l10n_util::GetNSString(IDS_PROFILES_CREATE_NEW_PROFILE_LINK)]);
[newButton setCell:buttonCell.get()];
[newButton setFont:[NSFont labelFontOfSize:12.0]];
[newButton setBezelStyle:NSRegularSquareBezelStyle];
@@ -352,12 +352,12 @@ const CGFloat kManagedUserSpacing = 26.0;
- (NSButton*)configureSwitchUserButton:(CGFloat)yOffset
updateWidthAdjust:(CGFloat*)widthAdjust {
- scoped_nsobject<NSButton> newButton(
+ base::scoped_nsobject<NSButton> newButton(
[[NSButton alloc] initWithFrame:NSMakeRect(
kManagedUserSpacing, yOffset, kBubbleMinWidth - kLabelInset, 16)]);
- scoped_nsobject<HyperlinkButtonCell> buttonCell(
+ base::scoped_nsobject<HyperlinkButtonCell> buttonCell(
[[HyperlinkButtonCell alloc] initTextCell:
- l10n_util::GetNSString(IDS_PROFILES_SWITCH_PROFILE_LINK)]);
+ l10n_util::GetNSString(IDS_PROFILES_SWITCH_PROFILE_LINK)]);
[newButton setCell:buttonCell.get()];
[newButton setFont:[NSFont labelFontOfSize:12.0]];
[newButton setBezelStyle:NSRegularSquareBezelStyle];
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
index a252969..153efc4 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_pump_mac.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
@@ -116,7 +116,7 @@ TEST_F(AvatarMenuBubbleControllerTest, PerformLayout) {
NSView* contents = [[controller() window] contentView];
EXPECT_EQ(4U, [[contents subviews] count]);
- scoped_nsobject<NSMutableArray> oldItems([[controller() items] copy]);
+ base::scoped_nsobject<NSMutableArray> oldItems([[controller() items] copy]);
// Now create a new profile and notify the delegate.
manager()->CreateTestingProfile("test3", scoped_ptr<PrefServiceSyncable>(),
@@ -180,7 +180,7 @@ TEST_F(AvatarMenuBubbleControllerTest, PerformLayout) {
@end
TEST_F(AvatarMenuBubbleControllerTest, HighlightForEventType) {
- scoped_nsobject<TestingAvatarMenuItemController> item(
+ base::scoped_nsobject<TestingAvatarMenuItemController> item(
[[TestingAvatarMenuItemController alloc] initWithModelIndex:0
menuController:nil]);
// Test non-active states first.
diff --git a/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm
index 2315cfc..83ddfa3 100644
--- a/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
diff --git a/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
index 4662fc6..736ae92 100644
--- a/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
@@ -69,8 +69,8 @@ const CGFloat kIconSize = 26.0;
@private
PasswordGenerationBubbleController* controller_;
BOOL hovering_;
- scoped_nsobject<NSImage> normalImage_;
- scoped_nsobject<NSImage> hoverImage_;
+ base::scoped_nsobject<NSImage> normalImage_;
+ base::scoped_nsobject<NSImage> hoverImage_;
}
- (void)setUpWithController:(PasswordGenerationBubbleController*)controller
@@ -260,12 +260,10 @@ const CGFloat kIconSize = 26.0;
- (void)setUpTrackingAreaInRect:(NSRect)frame
ofView:(PasswordGenerationTextField*)view {
NSRect iconFrame = [self getIconFrame:frame];
- scoped_nsobject<CrTrackingArea> area(
+ base::scoped_nsobject<CrTrackingArea> area(
[[CrTrackingArea alloc] initWithRect:iconFrame
options:NSTrackingMouseEnteredAndExited |
- NSTrackingActiveAlways
- owner:view
- userInfo:nil]);
+ NSTrackingActiveAlways owner:view userInfo:nil]);
[view addTrackingArea:area];
}
@@ -308,7 +306,7 @@ const CGFloat kIconSize = 26.0;
kTopBorderOffset +
info_bubble::kBubbleArrowHeight);
NSRect contentRect = NSMakeRect(0, 0, width, height);
- scoped_nsobject<InfoBubbleWindow> window(
+ base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -364,12 +362,11 @@ const CGFloat kIconSize = 26.0;
[button setAction:@selector(fillPassword:)];
[contentView addSubview:button];
- scoped_nsobject<NSTextField> title([[NSTextField alloc]
- initWithFrame:NSMakeRect(
- kBorderSize,
- kBorderSize + kTextFieldHeight + kVerticalSpacing,
- kTitleWidth,
- kTitleHeight)]);
+ base::scoped_nsobject<NSTextField> title([[NSTextField alloc] initWithFrame:
+ NSMakeRect(kBorderSize,
+ kBorderSize + kTextFieldHeight + kVerticalSpacing,
+ kTitleWidth,
+ kTitleHeight)]);
[title setEditable:NO];
[title setBordered:NO];
[title setStringValue:l10n_util::GetNSString(
diff --git a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h
index 8b909db..c92468e 100644
--- a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_COCOA_BROWSER_ZOOM_BUBBLE_CONTROLLER_H_
#include "base/mac/scoped_block.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/base_bubble_controller.h"
#import "ui/base/cocoa/tracking_area.h"
@@ -31,7 +31,7 @@ class WebContents;
base::mac::ScopedBlock<void(^)(ZoomBubbleController*)> closeObserver_;
// The text field that displays the current zoom percentage.
- scoped_nsobject<NSTextField> zoomPercent_;
+ base::scoped_nsobject<NSTextField> zoomPercent_;
// Whether or not the mouse is over the bubble.
BOOL isMouseInside_;
diff --git a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
index a7c9b9e..0f2baa2 100644
--- a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
@@ -74,11 +74,11 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
- (id)initWithParentWindow:(NSWindow*)parentWindow
closeObserver:(void(^)(ZoomBubbleController*))closeObserver {
- scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
- initWithContentRect:NSMakeRect(0, 0, 200, 100)
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:NO]);
+ base::scoped_nsobject<InfoBubbleWindow> window(
+ [[InfoBubbleWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 100)
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
if ((self = [super initWithWindow:window
parentWindow:parentWindow
anchoredAt:NSZeroPoint])) {
@@ -208,7 +208,8 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
// Separator view.
rect.origin.x += NSWidth(rect);
rect.size.width = 1;
- scoped_nsobject<NSBox> separatorView([[NSBox alloc] initWithFrame:rect]);
+ base::scoped_nsobject<NSBox> separatorView(
+ [[NSBox alloc] initWithFrame:rect]);
[separatorView setBoxType:NSBoxCustom];
ui::NativeTheme* nativeTheme = ui::NativeTheme::instance();
[separatorView setBorderColor:
@@ -241,7 +242,7 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
- (NSAttributedString*)attributedStringWithString:(NSString*)string
fontSize:(CGFloat)fontSize {
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setAlignment:NSCenterTextAlignment];
NSDictionary* attributes = @{
@@ -260,7 +261,7 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
- (NSButton*)addButtonWithTitleID:(int)titleID
fontSize:(CGFloat)fontSize
action:(SEL)action {
- scoped_nsobject<NSButton> button(
+ base::scoped_nsobject<NSButton> button(
[[ZoomHoverButton alloc] initWithFrame:NSZeroRect]);
NSString* title = l10n_util::GetNSStringWithFixup(titleID);
[button setAttributedTitle:[self attributedStringWithString:title
@@ -273,7 +274,7 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
}
- (NSTextField*)addZoomPercentTextField {
- scoped_nsobject<NSTextField> textField(
+ base::scoped_nsobject<NSTextField> textField(
[[NSTextField alloc] initWithFrame:NSZeroRect]);
[textField setEditable:NO];
[textField setBordered:NO];
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index 199e421..ea17ec7 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
#define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/extensions/extension_keybinding_registry.h"
@@ -169,7 +169,7 @@ class BrowserWindowCocoa :
Browser* browser_; // weak, owned by controller
BrowserWindowController* controller_; // weak, owns us
base::WeakPtrFactory<Browser> confirm_close_factory_;
- scoped_nsobject<NSString> pending_window_title_;
+ base::scoped_nsobject<NSString> pending_window_title_;
ui::WindowShowState initial_show_state_;
NSInteger attention_request_id_; // identifier from requestUserAttention
};
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 39813e2..53a69cf 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -497,13 +497,12 @@ void BrowserWindowCocoa::ShowOneClickSigninBubble(
WebContents* web_contents =
browser_->tab_strip_model()->GetActiveWebContents();
if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) {
- scoped_nsobject<OneClickSigninBubbleController> bubble_controller(
- [[OneClickSigninBubbleController alloc]
- initWithBrowserWindowController:cocoa_controller()
- webContents:web_contents
- errorMessage:base::SysUTF16ToNSString(
- error_message)
- callback:start_sync_callback]);
+ base::scoped_nsobject<OneClickSigninBubbleController> bubble_controller([
+ [OneClickSigninBubbleController alloc]
+ initWithBrowserWindowController:cocoa_controller()
+ webContents:web_contents
+ errorMessage:base::SysUTF16ToNSString(error_message)
+ callback:start_sync_callback]);
[bubble_controller showWindow:nil];
} else {
// Deletes itself when the dialog closes.
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm b/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
index 53835b3..8bb2f9e 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
@@ -14,8 +14,8 @@
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "testing/gtest/include/gtest/gtest.h"
-#import "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#import "third_party/ocmock/gtest_support.h"
// Main test class.
class BrowserWindowCocoaTest : public CocoaProfileTest {
@@ -79,7 +79,7 @@ TEST_F(BrowserWindowCocoaTest, TestFullscreen) {
// Wrap the FakeController in a scoped_nsobject instead of autoreleasing in
// windowWillClose: because we never actually open a window in this test (so
// windowWillClose: never gets called).
- scoped_nsobject<FakeController> fake_controller(
+ base::scoped_nsobject<FakeController> fake_controller(
[[FakeController alloc] init]);
scoped_ptr<BrowserWindowCocoa> bwc(new BrowserWindowCocoa(
browser(), static_cast<BrowserWindowController*>(fake_controller.get())));
@@ -99,7 +99,7 @@ TEST_F(BrowserWindowCocoaTest, TestFullscreenWithChrome) {
// Wrap the FakeController in a scoped_nsobject instead of autoreleasing in
// windowWillClose: because we never actually open a window in this test (so
// windowWillClose: never gets called).
- scoped_nsobject<FakeController> fake_controller(
+ base::scoped_nsobject<FakeController> fake_controller(
[[FakeController alloc] init]);
scoped_ptr<BrowserWindowCocoa> bwc(new BrowserWindowCocoa(
browser(), static_cast<BrowserWindowController*>(fake_controller.get())));
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h
index 8ce1492..2e5edbc 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.h
+++ b/chrome/browser/ui/cocoa/browser_window_controller.h
@@ -12,7 +12,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
@@ -62,16 +62,17 @@ class WebContents;
scoped_ptr<Browser> browser_;
NSWindow* savedRegularWindow_;
scoped_ptr<BrowserWindowCocoa> windowShim_;
- scoped_nsobject<ToolbarController> toolbarController_;
- scoped_nsobject<TabStripController> tabStripController_;
- scoped_nsobject<FindBarCocoaController> findBarCocoaController_;
- scoped_nsobject<InfoBarContainerController> infoBarContainerController_;
- scoped_nsobject<DownloadShelfController> downloadShelfController_;
- scoped_nsobject<BookmarkBarController> bookmarkBarController_;
- scoped_nsobject<DevToolsController> devToolsController_;
- scoped_nsobject<OverlayableContentsController> overlayableContentsController_;
- scoped_nsobject<PresentationModeController> presentationModeController_;
- scoped_nsobject<FullscreenExitBubbleController>
+ base::scoped_nsobject<ToolbarController> toolbarController_;
+ base::scoped_nsobject<TabStripController> tabStripController_;
+ base::scoped_nsobject<FindBarCocoaController> findBarCocoaController_;
+ base::scoped_nsobject<InfoBarContainerController> infoBarContainerController_;
+ base::scoped_nsobject<DownloadShelfController> downloadShelfController_;
+ base::scoped_nsobject<BookmarkBarController> bookmarkBarController_;
+ base::scoped_nsobject<DevToolsController> devToolsController_;
+ base::scoped_nsobject<OverlayableContentsController>
+ overlayableContentsController_;
+ base::scoped_nsobject<PresentationModeController> presentationModeController_;
+ base::scoped_nsobject<FullscreenExitBubbleController>
fullscreenExitBubbleController_;
// Strong. StatusBubble is a special case of a strong reference that
@@ -106,16 +107,16 @@ class WebContents;
// The view controller that manages the incognito badge or the multi-profile
// avatar icon. The view is always in the view hierarchy, but will be hidden
// unless it's appropriate to show it.
- scoped_nsobject<AvatarButtonController> avatarButtonController_;
+ base::scoped_nsobject<AvatarButtonController> avatarButtonController_;
// Lazily created view which draws the background for the floating set of bars
// in presentation mode (for window types having a floating bar; it remains
// nil for those which don't).
- scoped_nsobject<NSView> floatingBarBackingView_;
+ base::scoped_nsobject<NSView> floatingBarBackingView_;
// The borderless window used in fullscreen mode. Lion reuses the original
// window in fullscreen mode, so this is always nil on Lion.
- scoped_nsobject<NSWindow> fullscreenWindow_;
+ base::scoped_nsobject<NSWindow> fullscreenWindow_;
// Tracks whether presentation mode was entered from fullscreen mode or
// directly from normal windowed mode. Used to determine what to do when
@@ -143,7 +144,7 @@ class WebContents;
// where keyboard focus is. Whenever an object requires bar visibility, it has
// itself added to |barVisibilityLocks_|. When it no longer requires bar
// visibility, it has itself removed.
- scoped_nsobject<NSMutableSet> barVisibilityLocks_;
+ base::scoped_nsobject<NSMutableSet> barVisibilityLocks_;
// Bar visibility locks and releases only result (when appropriate) in changes
// in visible state when the following is |YES|.
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index d4cc3a3..f771854 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -10,7 +10,7 @@
#include "base/command_line.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h" // IDC_*
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
index 8951175..d991eaf 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -654,7 +654,7 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
browser()->tab_strip_model()->GetActiveWebContents()->GetView();
EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews());
- scoped_nsobject<HistoryOverlayController> overlay(
+ base::scoped_nsobject<HistoryOverlayController> overlay(
[[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
[overlay showPanelForView:web_contents_view->GetNativeView()];
EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews());
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 39c04b0..bd9cb661 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -7,7 +7,7 @@
#include <cmath>
#include "base/command_line.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
@@ -552,21 +552,22 @@ willPositionSheet:(NSWindow*)sheet
[bookmarkBubbleController_ ok:self];
// Save the current first responder so we can restore after views are moved.
- scoped_nsobject<FocusTracker> focusTracker(
+ base::scoped_nsobject<FocusTracker> focusTracker(
[[FocusTracker alloc] initWithWindow:sourceWindow]);
// While we move views (and focus) around, disable any bar visibility changes.
[self disableBarVisibilityUpdates];
// Retain the tab strip view while we remove it from its superview.
- scoped_nsobject<NSView> tabStripView;
+ base::scoped_nsobject<NSView> tabStripView;
if ([self hasTabStrip]) {
tabStripView.reset([[self tabStripView] retain]);
[tabStripView removeFromSuperview];
}
// Ditto for the content view.
- scoped_nsobject<NSView> contentView([[sourceWindow contentView] retain]);
+ base::scoped_nsobject<NSView> contentView(
+ [[sourceWindow contentView] retain]);
// Disable autoresizing of subviews while we move views around. This prevents
// spurious renderer resizes.
[contentView setAutoresizesSubviews:NO];
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
index ce77ea0..cd19e73 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#include "base/mac/mac_util.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
@@ -641,7 +641,7 @@ TEST_F(BrowserWindowControllerTest, TestStatusBubblePositioning) {
NSPoint bubbleOrigin = [controller_ statusBubbleBaseFrame].origin;
// Add a fake subview to devToolsView to emulate docked devTools.
- scoped_nsobject<NSView> view(
+ base::scoped_nsobject<NSView> view(
[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 10, 10)]);
[[controller_ devToolsView] addSubview:view];
[[controller_ devToolsView] adjustSubviews];
@@ -653,7 +653,7 @@ TEST_F(BrowserWindowControllerTest, TestStatusBubblePositioning) {
}
TEST_F(BrowserWindowControllerTest, TestSigninMenuItemNoErrors) {
- scoped_nsobject<NSMenuItem> syncMenuItem(
+ base::scoped_nsobject<NSMenuItem> syncMenuItem(
[[NSMenuItem alloc] initWithTitle:@""
action:@selector(commandDispatch)
keyEquivalent:@""]);
@@ -697,7 +697,7 @@ TEST_F(BrowserWindowControllerTest, TestSigninMenuItemNoErrors) {
}
TEST_F(BrowserWindowControllerTest, TestSigninMenuItemAuthError) {
- scoped_nsobject<NSMenuItem> syncMenuItem(
+ base::scoped_nsobject<NSMenuItem> syncMenuItem(
[[NSMenuItem alloc] initWithTitle:@""
action:@selector(commandDispatch)
keyEquivalent:@""]);
@@ -728,7 +728,7 @@ TEST_F(BrowserWindowControllerTest, TestSigninMenuItemAuthError) {
// If there's a separator after the signin menu item, make sure it is hidden/
// shown when the signin menu item is.
TEST_F(BrowserWindowControllerTest, TestSigninMenuItemWithSeparator) {
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
NSMenuItem* signinMenuItem =
[menu addItemWithTitle:@""
action:@selector(commandDispatch)
@@ -759,7 +759,7 @@ TEST_F(BrowserWindowControllerTest, TestSigninMenuItemWithSeparator) {
// If there's a non-separator item after the signin menu item, it should not
// change state when the signin menu item is hidden/shown.
TEST_F(BrowserWindowControllerTest, TestSigninMenuItemWithNonSeparator) {
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
NSMenuItem* signinMenuItem =
[menu addItemWithTitle:@""
action:@selector(commandDispatch)
@@ -809,7 +809,7 @@ TEST_F(BrowserWindowControllerTest, BookmarkBarHitTest) {
@private
// We release the window ourselves, so we don't have to rely on the unittest
// doing it for us.
- scoped_nsobject<NSWindow> testFullscreenWindow_;
+ base::scoped_nsobject<NSWindow> testFullscreenWindow_;
}
@end
diff --git a/chrome/browser/ui/cocoa/bubble_view.h b/chrome/browser/ui/cocoa/bubble_view.h
index 336f8cd..12c89f4 100644
--- a/chrome/browser/ui/cocoa/bubble_view.h
+++ b/chrome/browser/ui/cocoa/bubble_view.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// A view class that looks like a "bubble" with rounded corners and displays
// text inside. Can be themed. To put flush against the sides of a window, the
@@ -33,7 +33,7 @@ enum {
@interface BubbleView : NSView {
@private
- scoped_nsobject<NSString> content_;
+ base::scoped_nsobject<NSString> content_;
unsigned long cornerFlags_;
// The window from which we get the theme used to draw. In some cases,
// it might not be the window we're in. As a result, this may or may not
diff --git a/chrome/browser/ui/cocoa/bubble_view.mm b/chrome/browser/ui/cocoa/bubble_view.mm
index 4c3d8e0..b9b8648 100644
--- a/chrome/browser/ui/cocoa/bubble_view.mm
+++ b/chrome/browser/ui/cocoa/bubble_view.mm
@@ -104,7 +104,7 @@ const float kWindowEdge = 0.7f;
textColor = themeProvider->GetNSColor(ThemeProperties::COLOR_TAB_TEXT,
true);
NSFont* textFont = [self font];
- scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]);
[textShadow setShadowBlurRadius:0.0f];
[textShadow.get() setShadowColor:[textColor gtm_legibleTextColor]];
[textShadow.get() setShadowOffset:NSMakeSize(0.0f, -1.0f)];
diff --git a/chrome/browser/ui/cocoa/bubble_view_unittest.mm b/chrome/browser/ui/cocoa/bubble_view_unittest.mm
index 4b8850e..c1b5d9b 100644
--- a/chrome/browser/ui/cocoa/bubble_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/bubble_view_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bubble_view.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "testing/gtest_mac.h"
@@ -12,7 +12,7 @@ class BubbleViewTest : public CocoaTest {
public:
BubbleViewTest() {
NSRect frame = NSMakeRect(0, 0, 50, 50);
- scoped_nsobject<BubbleView> view(
+ base::scoped_nsobject<BubbleView> view(
[[BubbleView alloc] initWithFrame:frame themeProvider:test_window()]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
@@ -27,7 +27,7 @@ TEST_VIEW(BubbleViewTest, view_);
// Test a nil themeProvider in init.
TEST_F(BubbleViewTest, NilThemeProvider) {
NSRect frame = NSMakeRect(0, 0, 50, 50);
- scoped_nsobject<BubbleView> view(
+ base::scoped_nsobject<BubbleView> view(
[[BubbleView alloc] initWithFrame:frame themeProvider:nil]);
[[test_window() contentView] addSubview:view.get()];
[view display];
diff --git a/chrome/browser/ui/cocoa/certificate_viewer_mac.h b/chrome/browser/ui/cocoa/certificate_viewer_mac.h
index 737d40d..f33bef2d 100644
--- a/chrome/browser/ui/cocoa/certificate_viewer_mac.h
+++ b/chrome/browser/ui/cocoa/certificate_viewer_mac.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_COCOA_CERTIFICATE_VIEWER_MAC_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
@@ -21,11 +21,11 @@ namespace net {
@interface SSLCertificateViewerCocoa : NSObject<ConstrainedWindowSheet> {
@private
// The corresponding list of certificates.
- scoped_nsobject<NSArray> certificates_;
+ base::scoped_nsobject<NSArray> certificates_;
scoped_ptr<SSLCertificateViewerCocoaBridge> observer_;
- scoped_nsobject<SFCertificatePanel> panel_;
+ base::scoped_nsobject<SFCertificatePanel> panel_;
scoped_ptr<ConstrainedWindowMac> constrainedWindow_;
- scoped_nsobject<NSWindow> overlayWindow_;
+ base::scoped_nsobject<NSWindow> overlayWindow_;
BOOL closePending_;
// A copy of the sheet's frame used to restore on show.
NSRect oldSheetFrame_;
diff --git a/chrome/browser/ui/cocoa/certificate_viewer_mac.mm b/chrome/browser/ui/cocoa/certificate_viewer_mac.mm
index 0e66381..20d5787 100644
--- a/chrome/browser/ui/cocoa/certificate_viewer_mac.mm
+++ b/chrome/browser/ui/cocoa/certificate_viewer_mac.mm
@@ -10,7 +10,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/certificate_viewer.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
diff --git a/chrome/browser/ui/cocoa/chrome_event_processing_window.h b/chrome/browser/ui/cocoa/chrome_event_processing_window.h
index cb69c52..6cbc927 100644
--- a/chrome/browser/ui/cocoa/chrome_event_processing_window.h
+++ b/chrome/browser/ui/cocoa/chrome_event_processing_window.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
// Override NSWindow to access unhandled keyboard events (for command
diff --git a/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm b/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
index 823e7bd..b1566e9 100644
--- a/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
@@ -5,13 +5,13 @@
#include <Carbon/Carbon.h>
#include "base/debug/debugger.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
-#import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/ocmock_extensions.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h
index a91db0d..74ca702 100644
--- a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/files/file_path.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chrome_to_mobile_service.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
@@ -97,7 +97,7 @@ class ChromeToMobileBubbleNotificationBridge
base::FilePath snapshotPath_;
// An animation used to cycle through the "Sending..." status messages.
- scoped_nsobject<NSAnimation> progressAnimation_;
+ base::scoped_nsobject<NSAnimation> progressAnimation_;
}
// The owner of this object is responsible for showing the bubble. It is not
diff --git a/chrome/browser/ui/cocoa/clickhold_button_cell.h b/chrome/browser/ui/cocoa/clickhold_button_cell.h
index 554e1f6..7e290ae 100644
--- a/chrome/browser/ui/cocoa/clickhold_button_cell.h
+++ b/chrome/browser/ui/cocoa/clickhold_button_cell.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
// A button cell that implements "click hold" behavior after a specified delay
diff --git a/chrome/browser/ui/cocoa/clickhold_button_cell_unittest.mm b/chrome/browser/ui/cocoa/clickhold_button_cell_unittest.mm
index f76f805..0786271 100644
--- a/chrome/browser/ui/cocoa/clickhold_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/clickhold_button_cell_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/clickhold_button_cell.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -16,9 +16,10 @@ class ClickHoldButtonCellTest : public CocoaTest {
public:
ClickHoldButtonCellTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSButton> view(
+ [[NSButton alloc] initWithFrame:frame]);
view_ = view.get();
- scoped_nsobject<ClickHoldButtonCell> cell(
+ base::scoped_nsobject<ClickHoldButtonCell> cell(
[[ClickHoldButtonCell alloc] initTextCell:@"Testing"]);
[view_ setCell:cell.get()];
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/color_chooser_mac.mm b/chrome/browser/ui/cocoa/color_chooser_mac.mm
index f5e8dda..2241818 100644
--- a/chrome/browser/ui/cocoa/color_chooser_mac.mm
+++ b/chrome/browser/ui/cocoa/color_chooser_mac.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "content/public/browser/color_chooser.h"
#include "content/public/browser/web_contents.h"
@@ -54,7 +54,7 @@ class ColorChooserMac : public content::ColorChooser {
// The web contents invoking the color chooser. No ownership because it will
// outlive this class.
content::WebContents* web_contents_;
- scoped_nsobject<ColorPanelCocoa> panel_;
+ base::scoped_nsobject<ColorPanelCocoa> panel_;
};
ColorChooserMac* ColorChooserMac::current_color_chooser_ = NULL;
diff --git a/chrome/browser/ui/cocoa/command_observer_bridge_unittest.mm b/chrome/browser/ui/cocoa/command_observer_bridge_unittest.mm
index ed973b1..eb65c2e 100644
--- a/chrome/browser/ui/cocoa/command_observer_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/command_observer_bridge_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/command_updater.h"
#import "chrome/browser/ui/cocoa/command_observer_bridge.h"
@@ -45,7 +45,7 @@ class CommandObserverBridgeTest : public PlatformTest {
observer_([[CommandTestObserver alloc] init]) {
}
scoped_ptr<CommandUpdater> updater_;
- scoped_nsobject<CommandTestObserver> observer_;
+ base::scoped_nsobject<CommandTestObserver> observer_;
};
// Tests creation and deletion. NULL arguments aren't allowed.
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.h b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.h
index 8d2a3f3..c1971b0 100644
--- a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.h
+++ b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@class ConfirmBubbleController;
class ConfirmBubbleModel;
@@ -37,11 +37,11 @@ class ConfirmBubbleModel;
ConfirmBubbleController* controller_; // weak
// Controls used in this bubble.
- scoped_nsobject<NSImageView> icon_;
- scoped_nsobject<NSTextView> titleLabel_;
- scoped_nsobject<NSTextView> messageLabel_;
- scoped_nsobject<NSButton> okButton_;
- scoped_nsobject<NSButton> cancelButton_;
+ base::scoped_nsobject<NSImageView> icon_;
+ base::scoped_nsobject<NSTextView> titleLabel_;
+ base::scoped_nsobject<NSTextView> messageLabel_;
+ base::scoped_nsobject<NSButton> okButton_;
+ base::scoped_nsobject<NSButton> cancelButton_;
}
// Initializes a bubble view. Since this initializer programmatically creates a
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
index b16acea..474bf21 100644
--- a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
@@ -215,17 +215,17 @@ void ShowConfirmBubble(gfx::NativeView view,
initWithFrame:NSMakeRect(left, bottom, kMaxMessageWidth, 0)]);
NSString* messageText = [controller_ messageText];
NSMutableDictionary* attributes = [NSMutableDictionary dictionary];
- scoped_nsobject<NSMutableAttributedString> attributedMessage(
+ base::scoped_nsobject<NSMutableAttributedString> attributedMessage(
[[NSMutableAttributedString alloc] initWithString:messageText
attributes:attributes]);
NSString* linkText = [controller_ linkText];
if (linkText) {
- scoped_nsobject<NSAttributedString> whiteSpace(
+ base::scoped_nsobject<NSAttributedString> whiteSpace(
[[NSAttributedString alloc] initWithString:@" "]);
[attributedMessage.get() appendAttributedString:whiteSpace.get()];
[attributes setObject:[NSString string]
forKey:NSLinkAttributeName];
- scoped_nsobject<NSAttributedString> attributedLink(
+ base::scoped_nsobject<NSAttributedString> attributedLink(
[[NSAttributedString alloc] initWithString:linkText
attributes:attributes]);
[attributedMessage.get() appendAttributedString:attributedLink.get()];
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm
index 76d605ba..05b4652 100644
--- a/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
index 659fff8..27813eb 100644
--- a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
+++ b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
@@ -8,7 +8,7 @@
#import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/strings/sys_string_conversions.h"
@@ -65,7 +65,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
- (id)initWithFrame:(NSRect)frameRect {
if ((self = [super initWithFrame:frameRect])) {
- scoped_nsobject<NSTextField> message(
+ base::scoped_nsobject<NSTextField> message(
// The frame will be fixed up when |-setMessageText:| is called.
[[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]);
message_ = message.get();
@@ -95,9 +95,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
const CGFloat kHorizontalPadding = 30; // In view coordinates.
// Style the string.
- scoped_nsobject<NSMutableAttributedString> attrString(
+ base::scoped_nsobject<NSMutableAttributedString> attrString(
[[NSMutableAttributedString alloc] initWithString:text]);
- scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]);
[textShadow.get() setShadowColor:[NSColor colorWithCalibratedWhite:0
alpha:0.6]];
[textShadow.get() setShadowOffset:NSMakeSize(0, -1)];
@@ -192,7 +192,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
- (id)init {
const NSRect kWindowFrame = NSMakeRect(0, 0, 350, 70);
- scoped_nsobject<NSWindow> window(
+ base::scoped_nsobject<NSWindow> window(
[[NSWindow alloc] initWithContentRect:kWindowFrame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -205,7 +205,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
// Create the content view. Take the frame from the existing content view.
NSRect frame = [[window contentView] frame];
- scoped_nsobject<ConfirmQuitFrameView> frameView(
+ base::scoped_nsobject<ConfirmQuitFrameView> frameView(
[[ConfirmQuitFrameView alloc] initWithFrame:frame]);
contentView_ = frameView.get();
[window setContentView:contentView_];
@@ -230,7 +230,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
}
- (NSApplicationTerminateReply)runModalLoopForApplication:(NSApplication*)app {
- scoped_nsobject<ConfirmQuitPanelController> keepAlive([self retain]);
+ base::scoped_nsobject<ConfirmQuitPanelController> keepAlive([self retain]);
// If this is the second of two such attempts to quit within a certain time
// interval, then just quit.
@@ -327,7 +327,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
- (void)showWindow:(id)sender {
// If a panel that is fading out is going to be reused here, make sure it
// does not get released when the animation finishes.
- scoped_nsobject<ConfirmQuitPanelController> keepAlive([self retain]);
+ base::scoped_nsobject<ConfirmQuitPanelController> keepAlive([self retain]);
[[self window] setAnimations:[NSDictionary dictionary]];
[[self window] center];
[[self window] setAlphaValue:1.0];
@@ -342,7 +342,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
- (void)animateFadeOut {
NSWindow* window = [self window];
- scoped_nsobject<CAAnimation> animation(
+ base::scoped_nsobject<CAAnimation> animation(
[[window animationForKey:@"alphaValue"] copy]);
[animation setDelegate:self];
[animation setDuration:0.2];
diff --git a/chrome/browser/ui/cocoa/confirm_quit_panel_controller_unittest.mm b/chrome/browser/ui/cocoa/confirm_quit_panel_controller_unittest.mm
index 0348801..d330230 100644
--- a/chrome/browser/ui/cocoa/confirm_quit_panel_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/confirm_quit_panel_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/browser/ui/cocoa/confirm_quit.h"
#include "testing/gtest_mac.h"
diff --git a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
index 3a718a4..36529a9 100644
--- a/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm
@@ -6,7 +6,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -95,7 +95,7 @@ class ConstrainedWebDialogDelegateViewMac :
private:
scoped_ptr<ConstrainedWebDialogDelegateMac> impl_;
scoped_ptr<ConstrainedWindowMac> constrained_window_;
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSWindow> window_;
DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewMac);
};
@@ -119,9 +119,8 @@ ConstrainedWebDialogDelegateViewMac::ConstrainedWebDialogDelegateViewMac(
[[window_ contentView]
addSubview:GetWebContents()->GetView()->GetNativeView()];
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
- [[CustomConstrainedWindowSheet alloc]
- initWithCustomWindow:window_]);
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]);
constrained_window_.reset(new ConstrainedWindowMac(
this, web_contents, sheet));
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h
index ac2f34c..389f6a8 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// This class implements an alert that has a constrained window look and feel
// (close button on top right, WebUI style buttons, etc...). The alert can be
@@ -15,12 +15,12 @@
// this would be done by ConstrainedWindowSheetController.
@interface ConstrainedWindowAlert : NSObject {
@private
- scoped_nsobject<NSTextField> informativeTextField_;
- scoped_nsobject<NSTextField> messageTextField_;
- scoped_nsobject<NSView> accessoryView_;
- scoped_nsobject<NSMutableArray> buttons_;
- scoped_nsobject<NSButton> closeButton_;
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSTextField> informativeTextField_;
+ base::scoped_nsobject<NSTextField> messageTextField_;
+ base::scoped_nsobject<NSView> accessoryView_;
+ base::scoped_nsobject<NSMutableArray> buttons_;
+ base::scoped_nsobject<NSButton> closeButton_;
+ base::scoped_nsobject<NSWindow> window_;
}
@property(nonatomic, copy) NSString* informativeText;
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm
index 7fda80b..036c42a 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.mm
@@ -110,7 +110,7 @@ const CGFloat kButtonGap = 6;
action:(SEL)action {
if (!buttons_.get())
buttons_.reset([[NSMutableArray alloc] init]);
- scoped_nsobject<NSButton> button(
+ base::scoped_nsobject<NSButton> button(
[[ConstrainedWindowButton alloc] initWithFrame:NSZeroRect]);
[button setTitle:title];
[button setKeyEquivalent:keyEquivalent];
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert_unittest.mm
index 52f6ca1..868f81d 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert_unittest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_alert_unittest.mm
@@ -11,7 +11,7 @@ class ConstrainedWindowAlertTest : public CocoaTest {
// Test showing the alert.
TEST_F(ConstrainedWindowAlertTest, Show) {
- scoped_nsobject<ConstrainedWindowAlert> alert(
+ base::scoped_nsobject<ConstrainedWindowAlert> alert(
[[ConstrainedWindowAlert alloc] init]);
EXPECT_TRUE([alert window]);
EXPECT_TRUE([alert closeButton]);
@@ -27,7 +27,7 @@ TEST_F(ConstrainedWindowAlertTest, Show) {
// Test showing the alert with no buttons.
TEST_F(ConstrainedWindowAlertTest, NoButtons) {
- scoped_nsobject<ConstrainedWindowAlert> alert(
+ base::scoped_nsobject<ConstrainedWindowAlert> alert(
[[ConstrainedWindowAlert alloc] init]);
[alert layout];
[[alert window] makeKeyAndOrderFront:nil];
@@ -35,13 +35,13 @@ TEST_F(ConstrainedWindowAlertTest, NoButtons) {
// Test adding an accessory view to an alert.
TEST_F(ConstrainedWindowAlertTest, AccessoryView) {
- scoped_nsobject<ConstrainedWindowAlert> alert(
+ base::scoped_nsobject<ConstrainedWindowAlert> alert(
[[ConstrainedWindowAlert alloc] init]);
[alert addButtonWithTitle:@"OK" keyEquivalent:@"" target:nil action:NULL];
[alert addButtonWithTitle:@"Cancel" keyEquivalent:@"" target:nil action:NULL];
NSRect view_rect = NSMakeRect(0, 0, 700, 300);
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:view_rect]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:view_rect]);
EXPECT_FALSE([alert accessoryView]);
[alert setAccessoryView:view];
EXPECT_NSEQ([alert accessoryView], view);
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h
index 3248411..635a6e6 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h
@@ -7,12 +7,12 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// Base class for all constrained window animation classes.
@interface ConstrainedWindowAnimationBase : NSAnimation {
@protected
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSWindow> window_;
}
- (id)initWithWindow:(NSWindow*)window;
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation_unittest.mm
index 9c7c2bd..5ec022f 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation_unittest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_animation_unittest.mm
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_pump_mac.h"
-#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_animation.h"
// This class runs an animation for exactly two frames then end it.
@interface ConstrainedWindowAnimationTestDelegate : NSObject
@@ -57,26 +57,26 @@ class ConstrainedWindowAnimationTest : public CocoaTest {
delegate_.reset([[ConstrainedWindowAnimationTestDelegate alloc] init]);
}
- scoped_nsobject<ConstrainedWindowAnimationTestDelegate> delegate_;
+ base::scoped_nsobject<ConstrainedWindowAnimationTestDelegate> delegate_;
};
// Test the show animation.
TEST_F(ConstrainedWindowAnimationTest, Show) {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationShow alloc] initWithWindow:test_window()]);
[delegate_ runAnimation:animation];
}
// Test the hide animation.
TEST_F(ConstrainedWindowAnimationTest, Hide) {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationHide alloc] initWithWindow:test_window()]);
[delegate_ runAnimation:animation];
}
// Test the pulse animation.
TEST_F(ConstrainedWindowAnimationTest, Pulse) {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationPulse alloc] initWithWindow:test_window()]);
[delegate_ runAnimation:animation];
}
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm
index fb07d84..39e4a3f 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_button.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/key_equivalent_constants.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/molokocacao/NSBezierPath+MCAdditions.h"
@@ -88,13 +88,13 @@ NSAttributedString* GetButtonAttributedString(NSString* title,
const SkColor shadow_color[] =
{0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF};
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow setShadowColor:
gfx::SkColorToCalibratedNSColor(shadow_color[button_state])];
[shadow setShadowOffset:NSMakeSize(0, -1)];
[shadow setShadowBlurRadius:0];
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setAlignment:NSCenterTextAlignment];
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm
index 3f0628b..ed9b40c 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_button_unittest.mm
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -19,7 +19,7 @@ class ConstrainedWindowButtonTest : public CocoaTest {
}
protected:
- scoped_nsobject<ConstrainedWindowButton> button_;
+ base::scoped_nsobject<ConstrainedWindowButton> button_;
};
TEST_VIEW(ConstrainedWindowButtonTest, button_)
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.mm
index 5d73a8f..2be3ee7 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "skia/ext/skia_utils_mac.h"
namespace constrained_window {
@@ -29,7 +29,7 @@ NSAttributedString* GetAttributedLabelString(
const gfx::Font& font =
ui::ResourceBundle::GetSharedInstance().GetFont(fontStyle);
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setAlignment:alignment];
[paragraphStyle setLineBreakMode:lineBreakMode];
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h
index d1b6007..b36f07e 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h
@@ -7,14 +7,14 @@
#import <Cocoa/Cocoa.h>
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h"
-#import "base/memory/scoped_nsobject.h"
// Represents a custom sheet. The sheet's window is shown without using the
// system |beginSheet:...| API.
@interface CustomConstrainedWindowSheet : NSObject<ConstrainedWindowSheet> {
@private
- scoped_nsobject<NSWindow> customWindow_;
+ base::scoped_nsobject<NSWindow> customWindow_;
}
- (id)initWithCustomWindow:(NSWindow*)customWindow;
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm
index 28668aa..ab3d83e 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm
@@ -17,7 +17,7 @@
}
- (void)showSheetForWindow:(NSWindow*)window {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationShow alloc] initWithWindow:customWindow_]);
[window addChildWindow:customWindow_
ordered:NSWindowAbove];
@@ -29,7 +29,7 @@
- (void)closeSheetWithAnimation:(BOOL)withAnimation {
if (withAnimation) {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationHide alloc] initWithWindow:customWindow_]);
[animation startAnimation];
}
@@ -47,7 +47,7 @@
}
- (void)pulseSheet {
- scoped_nsobject<NSAnimation> animation(
+ base::scoped_nsobject<NSAnimation> animation(
[[ConstrainedWindowAnimationPulse alloc] initWithWindow:customWindow_]);
[animation startAnimation];
}
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.mm
index 984b176..cf972e0 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/chrome_style.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h"
#include "skia/ext/skia_utils_mac.h"
@@ -17,7 +17,7 @@
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO])) {
- scoped_nsobject<NSView> contentView(
+ base::scoped_nsobject<NSView> contentView(
[[ConstrainedWindowCustomWindowContentView alloc]
initWithFrame:NSZeroRect]);
[self setContentView:contentView];
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm
index f40ac1a..91dc464 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
@@ -11,7 +11,7 @@ class ConstrainedWindowCustomWindowTest : public CocoaTest {
// Simply test creating and drawing the window.
TEST_F(ConstrainedWindowCustomWindowTest, Basic) {
- scoped_nsobject<ConstrainedWindowCustomWindow> window(
+ base::scoped_nsobject<ConstrainedWindowCustomWindow> window(
[[ConstrainedWindowCustomWindow alloc]
initWithContentRect:NSMakeRect(0, 0, 10, 10)]);
EXPECT_TRUE([window canBecomeKeyWindow]);
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h
index 3707539..73202e8 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "components/web_modal/native_web_contents_modal_dialog.h"
namespace content {
@@ -50,7 +50,7 @@ class ConstrainedWindowMac {
// The WebContents that owns and constrains this ConstrainedWindowMac. Weak.
content::WebContents* web_contents_;
- scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
+ base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
// This is true if the constrained window has been shown.
bool shown_;
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
index 6147583..04bc13a 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm
@@ -66,8 +66,8 @@ class ConstrainedWindowMacTest : public InProcessBrowserTest {
}
protected:
- scoped_nsobject<CustomConstrainedWindowSheet> sheet_;
- scoped_nsobject<NSWindow> sheet_window_;
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet_;
+ base::scoped_nsobject<NSWindow> sheet_window_;
content::WebContents* tab0_;
content::WebContents* tab1_;
BrowserWindowController* controller_;
@@ -137,7 +137,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowMacTest, BrowserWindowClose) {
EXPECT_EQ(1.0, [sheet_window_ alphaValue]);
// Close the browser window.
- scoped_nsobject<NSWindow> browser_window(
+ base::scoped_nsobject<NSWindow> browser_window(
[browser()->window()->GetNativeWindow() retain]);
EXPECT_TRUE([browser_window isVisible]);
[browser()->window()->GetNativeWindow() performClose:nil];
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
index 3223ac2..329594e 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
@@ -8,8 +8,8 @@
#import <Cocoa/Cocoa.h>
#include <vector>
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_vector.h"
-#include "base/memory/scoped_nsobject.h"
@protocol ConstrainedWindowSheet;
@@ -18,9 +18,9 @@
// A tab in this case is the |parentView| passed to |-showSheet:forParentView:|.
@interface ConstrainedWindowSheetController : NSObject {
@private
- scoped_nsobject<NSMutableArray> sheets_;
- scoped_nsobject<NSWindow> parentWindow_;
- scoped_nsobject<NSView> activeView_;
+ base::scoped_nsobject<NSMutableArray> sheets_;
+ base::scoped_nsobject<NSWindow> parentWindow_;
+ base::scoped_nsobject<NSView> activeView_;
}
// Returns a sheet controller for |parentWindow|. If a sheet controller does not
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
index c801d25..b4b4236 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
@@ -25,7 +25,7 @@ NSValue* GetKeyForParentWindow(NSWindow* parent_window) {
// An invisible overlay window placed on top of the sheet's parent view.
// This window blocks interaction with the underlying view.
@interface CWSheetOverlayWindow : NSWindow {
- scoped_nsobject<ConstrainedWindowSheetController> controller_;
+ base::scoped_nsobject<ConstrainedWindowSheetController> controller_;
}
@end
@@ -78,7 +78,7 @@ NSValue* GetKeyForParentWindow(NSWindow* parent_window) {
if (controller)
return controller;
- scoped_nsobject<ConstrainedWindowSheetController> new_controller(
+ base::scoped_nsobject<ConstrainedWindowSheetController> new_controller(
[[ConstrainedWindowSheetController alloc]
initWithParentWindow:parentWindow]);
if (!g_sheetControllers)
@@ -140,14 +140,13 @@ NSValue* GetKeyForParentWindow(NSWindow* parent_window) {
// Create an invisible overlay window.
NSRect rect = [self overlayWindowFrameForParentView:parentView];
- scoped_nsobject<NSWindow> overlayWindow(
- [[CWSheetOverlayWindow alloc] initWithContentRect:rect
- controller:self]);
+ base::scoped_nsobject<NSWindow> overlayWindow(
+ [[CWSheetOverlayWindow alloc] initWithContentRect:rect controller:self]);
[parentWindow_ addChildWindow:overlayWindow
ordered:NSWindowAbove];
// Add an entry for the sheet.
- scoped_nsobject<ConstrainedWindowSheetInfo> info(
+ base::scoped_nsobject<ConstrainedWindowSheetInfo> info(
[[ConstrainedWindowSheetInfo alloc] initWithSheet:sheet
parentView:parentView
overlayWindow:overlayWindow]);
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm
index fdba717..562155a 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm
@@ -79,7 +79,8 @@ class ConstrainedWindowSheetControllerTest : public CocoaTest {
NSRect dummyRect = NSMakeRect(0, 0, 50, 50);
tab_views_.reset([[NSMutableArray alloc] init]);
for (int i = 0; i < 2; ++i) {
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:dummyRect]);
+ base::scoped_nsobject<NSView> view(
+ [[NSView alloc] initWithFrame:dummyRect]);
[tab_views_ addObject:view];
}
tab0_.reset([[tab_views_ objectAtIndex:0] retain]);
@@ -135,13 +136,13 @@ class ConstrainedWindowSheetControllerTest : public CocoaTest {
EXPECT_EQ(expected_x, NSMinX(sheet_frame));
}
- scoped_nsobject<NSWindow> sheet_window_;
- scoped_nsobject<CustomConstrainedWindowSheet> sheet_;
- scoped_nsobject<ConstrainedWindowSheetController> controller_;
- scoped_nsobject<NSMutableArray> tab_views_;
- scoped_nsobject<NSView> active_tab_view_;
- scoped_nsobject<NSView> tab0_;
- scoped_nsobject<NSView> tab1_;
+ base::scoped_nsobject<NSWindow> sheet_window_;
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet_;
+ base::scoped_nsobject<ConstrainedWindowSheetController> controller_;
+ base::scoped_nsobject<NSMutableArray> tab_views_;
+ base::scoped_nsobject<NSView> active_tab_view_;
+ base::scoped_nsobject<NSView> tab0_;
+ base::scoped_nsobject<NSView> tab1_;
};
// Test showing then hiding the sheet.
@@ -183,11 +184,11 @@ TEST_F(ConstrainedWindowSheetControllerTest, AddToInactiveTab) {
// Test that two parent windows with two sheet controllers don't conflict.
TEST_F(ConstrainedWindowSheetControllerTest, TwoParentWindows) {
- scoped_nsobject<NSWindow> parent_window2([[NSWindow alloc]
- initWithContentRect:NSMakeRect(0, 0, 30, 30)
- styleMask:NSTitledWindowMask
- backing:NSBackingStoreBuffered
- defer:NO]);
+ base::scoped_nsobject<NSWindow> parent_window2(
+ [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 30, 30)
+ styleMask:NSTitledWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
[parent_window2 setReleasedWhenClosed:NO];
ConstrainedWindowSheetController* controller2 =
@@ -255,9 +256,9 @@ TEST_F(ConstrainedWindowSheetControllerTest, ResizeHiddenSheet) {
// Test system sheets.
TEST_F(ConstrainedWindowSheetControllerTest, SystemSheet) {
- scoped_nsobject<ConstrainedWindowSystemSheetTest> system_sheet(
+ base::scoped_nsobject<ConstrainedWindowSystemSheetTest> system_sheet(
[[ConstrainedWindowSystemSheetTest alloc] init]);
- scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]);
+ base::scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]);
[system_sheet setAlert:alert];
EXPECT_FALSE([[alert window] isVisible]);
@@ -272,9 +273,9 @@ TEST_F(ConstrainedWindowSheetControllerTest, SystemSheet) {
// Test showing a system sheet on an inactive tab.
TEST_F(ConstrainedWindowSheetControllerTest, SystemSheetAddToInactiveTab) {
- scoped_nsobject<ConstrainedWindowSystemSheetTest> system_sheet(
+ base::scoped_nsobject<ConstrainedWindowSystemSheetTest> system_sheet(
[[ConstrainedWindowSystemSheetTest alloc] init]);
- scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]);
+ base::scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]);
[system_sheet setAlert:alert];
EXPECT_FALSE([[alert window] isVisible]);
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h
index 0c3c19b..b72e4f6 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_info.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@protocol ConstrainedWindowSheet;
@@ -16,9 +16,9 @@
// public use.
@interface ConstrainedWindowSheetInfo : NSObject {
@private
- scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
- scoped_nsobject<NSView> parentView_;
- scoped_nsobject<NSWindow> overlayWindow_;
+ base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
+ base::scoped_nsobject<NSView> parentView_;
+ base::scoped_nsobject<NSWindow> overlayWindow_;
BOOL sheetDidShow_;
}
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
index 2d0c06b..71d193f 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/browsing_data/cookies_tree_model.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -48,7 +48,7 @@ class CollectedCookiesMac : public ConstrainedWindowMacDelegate,
scoped_ptr<ConstrainedWindowMac> window_;
- scoped_nsobject<CollectedCookiesWindowController> sheet_controller_;
+ base::scoped_nsobject<CollectedCookiesWindowController> sheet_controller_;
DISALLOW_COPY_AND_ASSIGN(CollectedCookiesMac);
};
@@ -68,11 +68,11 @@ class CollectedCookiesMac : public ConstrainedWindowMacDelegate,
scoped_ptr<CookiesTreeModel> blockedTreeModel_;
// Cached array of icons.
- scoped_nsobject<NSMutableArray> icons_;
+ base::scoped_nsobject<NSMutableArray> icons_;
// Our Cocoa copy of the model.
- scoped_nsobject<CocoaCookieTreeNode> cocoaAllowedTreeModel_;
- scoped_nsobject<CocoaCookieTreeNode> cocoaBlockedTreeModel_;
+ base::scoped_nsobject<CocoaCookieTreeNode> cocoaAllowedTreeModel_;
+ base::scoped_nsobject<CocoaCookieTreeNode> cocoaBlockedTreeModel_;
BOOL allowedCookiesButtonsEnabled_;
BOOL blockedCookiesButtonsEnabled_;
@@ -89,9 +89,9 @@ class CollectedCookiesMac : public ConstrainedWindowMacDelegate,
IBOutlet NSTextField* blockedCookiesText_;
IBOutlet NSView* cookieDetailsViewPlaceholder_;
- scoped_nsobject<NSViewAnimation> animation_;
+ base::scoped_nsobject<NSViewAnimation> animation_;
- scoped_nsobject<CookieDetailsViewController> detailsViewController_;
+ base::scoped_nsobject<CookieDetailsViewController> detailsViewController_;
content::WebContents* webContents_; // weak
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
index f1e44d9..93e537c 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
@@ -82,7 +82,7 @@ CollectedCookiesMac::CollectedCookiesMac(content::WebContents* web_contents) {
initWithWebContents:web_contents
collectedCookiesMac:this]);
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[sheet_controller_ window]]);
window_.reset(new ConstrainedWindowMac(
@@ -170,7 +170,7 @@ void CollectedCookiesMac::OnConstrainedWindowClosed(
green:kBannerGradientColorBottom[1]
blue:kBannerGradientColorBottom[2]
alpha:1.0];
- scoped_nsobject<NSGradient> bannerGradient(
+ base::scoped_nsobject<NSGradient> bannerGradient(
[[NSGradient alloc] initWithStartingColor:bannerStartingColor
endingColor:bannerEndingColor]);
[infoBar_ setGradient:bannerGradient];
@@ -382,7 +382,7 @@ void CollectedCookiesMac::OnConstrainedWindowClosed(
// Create the Cocoa model.
CookieTreeNode* root =
static_cast<CookieTreeNode*>(allowedTreeModel_->GetRoot());
- scoped_nsobject<CocoaCookieTreeNode> model(
+ base::scoped_nsobject<CocoaCookieTreeNode> model(
[[CocoaCookieTreeNode alloc] initWithNode:root]);
[self setCocoaAllowedTreeModel:model.get()]; // Takes ownership.
root = static_cast<CookieTreeNode*>(blockedTreeModel_->GetRoot());
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
index d6097dd..081f98d 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
@@ -6,7 +6,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#include "content/public/common/media_stream_request.h"
@@ -91,4 +91,4 @@ typedef std::map<NSPopUpButton*, MediaMenuParts*> MediaMenuPartsMap;
// Returns the weak reference to the |mediaMenus_|.
- (content_setting_bubble::MediaMenuPartsMap*)mediaMenus;
-@end \ No newline at end of file
+@end
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index 7d1c13c..5040e5b 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -90,7 +90,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
// Sets the title for the popup button.
void SetTitleForPopUpButton(NSPopUpButton* button, NSString* title) {
- scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
+ base::scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
[titleItem setTitle:title];
[[button cell] setUsesItemFromMenu:NO];
[[button cell] setMenuItem:titleItem.get()];
@@ -293,8 +293,8 @@ MediaMenuParts::~MediaMenuParts() {}
title:(NSString*)title
icon:(NSImage*)icon
referenceFrame:(NSRect)referenceFrame {
- scoped_nsobject<HyperlinkButtonCell> cell([[HyperlinkButtonCell alloc]
- initTextCell:title]);
+ base::scoped_nsobject<HyperlinkButtonCell> cell(
+ [[HyperlinkButtonCell alloc] initTextCell:title]);
[cell.get() setAlignment:NSNaturalTextAlignment];
if (icon) {
[cell.get() setImagePosition:NSImageLeft];
@@ -410,7 +410,7 @@ MediaMenuParts::~MediaMenuParts() {}
// "Clear" button / text field.
if (!content.custom_link.empty()) {
- scoped_nsobject<NSControl> control;
+ base::scoped_nsobject<NSControl> control;
if(content.custom_link_enabled) {
NSRect buttonFrame = NSMakeRect(0, 0,
NSWidth(containerFrame),
@@ -512,7 +512,7 @@ MediaMenuParts::~MediaMenuParts() {}
// |buttonFrame| will be resized and repositioned later on.
NSRect buttonFrame = NSMakeRect(NSMinX(radioFrame), 0, 0, 0);
- scoped_nsobject<NSPopUpButton> button(
+ base::scoped_nsobject<NSPopUpButton> button(
[[NSPopUpButton alloc] initWithFrame:buttonFrame]);
[button setTarget:self];
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
index f7f1a43..fee3a79 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa_unittest.mm
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
@@ -48,7 +48,7 @@ class ContentSettingBubbleControllerTest
ContentSettingBubbleController* CreateBubbleController(
ContentSettingsType settingsType);
- scoped_nsobject<NSWindow> parent_;
+ base::scoped_nsobject<NSWindow> parent_;
private:
base::mac::ScopedNSAutoreleasePool pool_;
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details.h b/chrome/browser/ui/cocoa/content_settings/cookie_details.h
index ca439d8..c0c9c84 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details.h
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/browsing_data/browsing_data_database_helper.h"
#include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
#include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
@@ -75,52 +75,52 @@ enum CocoaCookieDetailsType {
BOOL hasExpiration_;
// Only set for type kCocoaCookieDetailsTypeCookie.
- scoped_nsobject<NSString> content_;
- scoped_nsobject<NSString> path_;
- scoped_nsobject<NSString> sendFor_;
+ base::scoped_nsobject<NSString> content_;
+ base::scoped_nsobject<NSString> path_;
+ base::scoped_nsobject<NSString> sendFor_;
// Stringifed dates.
- scoped_nsobject<NSString> expires_;
+ base::scoped_nsobject<NSString> expires_;
// Only set for type kCocoaCookieDetailsTypeCookie and
// kCocoaCookieDetailsTypeTreeAppCache nodes.
- scoped_nsobject<NSString> created_;
+ base::scoped_nsobject<NSString> created_;
// Only set for types kCocoaCookieDetailsTypeCookie, and
// kCocoaCookieDetailsTypePromptDatabase nodes.
- scoped_nsobject<NSString> name_;
+ base::scoped_nsobject<NSString> name_;
// Only set for type kCocoaCookieDetailsTypeTreeLocalStorage,
// kCocoaCookieDetailsTypeTreeDatabase,
// kCocoaCookieDetailsTypePromptDatabase,
// kCocoaCookieDetailsTypeTreeIndexedDB, and
// kCocoaCookieDetailsTypeTreeAppCache nodes.
- scoped_nsobject<NSString> fileSize_;
+ base::scoped_nsobject<NSString> fileSize_;
// Only set for types kCocoaCookieDetailsTypeTreeLocalStorage,
// kCocoaCookieDetailsTypeTreeDatabase, and
// kCocoaCookieDetailsTypeTreeIndexedDB nodes.
- scoped_nsobject<NSString> lastModified_;
+ base::scoped_nsobject<NSString> lastModified_;
// Only set for type kCocoaCookieDetailsTypeTreeAppCache nodes.
- scoped_nsobject<NSString> lastAccessed_;
+ base::scoped_nsobject<NSString> lastAccessed_;
// Only set for type kCocoaCookieDetailsTypeCookie,
// kCocoaCookieDetailsTypePromptDatabase,
// kCocoaCookieDetailsTypePromptLocalStorage, and
// kCocoaCookieDetailsTypeTreeIndexedDB nodes.
- scoped_nsobject<NSString> domain_;
+ base::scoped_nsobject<NSString> domain_;
// Only set for type kCocoaCookieTreeNodeTypeDatabaseStorage and
// kCocoaCookieDetailsTypePromptDatabase nodes.
- scoped_nsobject<NSString> databaseDescription_;
+ base::scoped_nsobject<NSString> databaseDescription_;
// Only set for type kCocoaCookieDetailsTypePromptLocalStorage.
- scoped_nsobject<NSString> localStorageKey_;
- scoped_nsobject<NSString> localStorageValue_;
+ base::scoped_nsobject<NSString> localStorageKey_;
+ base::scoped_nsobject<NSString> localStorageValue_;
// Only set for type kCocoaCookieDetailsTypeTreeAppCache and
// kCocoaCookieDetailsTypePromptAppCache.
- scoped_nsobject<NSString> manifestURL_;
+ base::scoped_nsobject<NSString> manifestURL_;
}
@property(nonatomic, readonly) BOOL canEditExpiration;
@@ -213,7 +213,7 @@ enum CocoaCookieDetailsType {
// |CocoaCookieDetails| object for the cookie prompt.
@interface CookiePromptContentDetailsAdapter : NSObject {
@private
- scoped_nsobject<CocoaCookieDetails> details_;
+ base::scoped_nsobject<CocoaCookieDetails> details_;
}
- (CocoaCookieDetails*)details;
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
index 37cda45..fed777c 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
@@ -16,14 +16,14 @@ class CookiesDetailsTest : public CocoaTest {
};
TEST_F(CookiesDetailsTest, CreateForFolder) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
details.reset([[CocoaCookieDetails alloc] initAsFolder]);
EXPECT_EQ([details.get() type], kCocoaCookieDetailsTypeFolder);
}
TEST_F(CookiesDetailsTest, CreateForCookie) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
GURL url("http://chromium.org");
std::string cookieLine(
"PHPSESSID=0123456789abcdef0123456789abcdef; path=/");
@@ -53,7 +53,7 @@ TEST_F(CookiesDetailsTest, CreateForCookie) {
}
TEST_F(CookiesDetailsTest, CreateForTreeDatabase) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
GURL origin("http://chromium.org");
std::string database_name("sassolungo");
std::string description("a great place to climb");
@@ -80,7 +80,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeDatabase) {
}
TEST_F(CookiesDetailsTest, CreateForTreeLocalStorage) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
const GURL kOrigin("http://chromium.org/");
int64 size = 1234;
base::Time last_modified = base::Time::Now();
@@ -104,7 +104,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeLocalStorage) {
}
TEST_F(CookiesDetailsTest, CreateForTreeAppCache) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
GURL url("http://chromium.org/stuff.manifest");
appcache::AppCacheInfo info;
@@ -133,7 +133,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeAppCache) {
}
TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
GURL origin("http://moose.org/");
int64 size = 1234;
@@ -162,7 +162,7 @@ TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
}
TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
std::string domain("chromium.org");
string16 name(base::SysNSStringToUTF16(@"wicked_name"));
string16 desc(base::SysNSStringToUTF16(@"desc"));
@@ -188,7 +188,7 @@ TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
}
TEST_F(CookiesDetailsTest, CreateForPromptLocalStorage) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
std::string domain("chromium.org");
string16 key(base::SysNSStringToUTF16(@"testKey"));
string16 value(base::SysNSStringToUTF16(@"testValue"));
@@ -212,7 +212,7 @@ TEST_F(CookiesDetailsTest, CreateForPromptLocalStorage) {
}
TEST_F(CookiesDetailsTest, CreateForPromptAppCache) {
- scoped_nsobject<CocoaCookieDetails> details;
+ base::scoped_nsobject<CocoaCookieDetails> details;
std::string manifestURL("http://html5demos.com/html5demo.manifest");
details.reset([[CocoaCookieDetails alloc]
initWithAppCacheManifestURL:manifestURL.c_str()]);
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
index 29a0806..c901c71 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
@@ -52,14 +52,14 @@ static CookiePromptContentDetailsAdapter* CreateDatabaseTestContent() {
}
TEST_F(CookieDetailsViewControllerTest, Create) {
- scoped_nsobject<CookieDetailsViewController> detailsViewController(
+ base::scoped_nsobject<CookieDetailsViewController> detailsViewController(
[[CookieDetailsViewController alloc] init]);
}
TEST_F(CookieDetailsViewControllerTest, ShrinkToFit) {
- scoped_nsobject<CookieDetailsViewController> detailsViewController(
+ base::scoped_nsobject<CookieDetailsViewController> detailsViewController(
[[CookieDetailsViewController alloc] init]);
- scoped_nsobject<CookiePromptContentDetailsAdapter> adapter(
+ base::scoped_nsobject<CookiePromptContentDetailsAdapter> adapter(
[CreateDatabaseTestContent() retain]);
[detailsViewController.get() setContentObject:adapter.get()];
NSRect beforeFrame = [[detailsViewController.get() view] frame];
@@ -70,10 +70,10 @@ TEST_F(CookieDetailsViewControllerTest, ShrinkToFit) {
}
TEST_F(CookieDetailsViewControllerTest, ExpirationEditability) {
- scoped_nsobject<CookieDetailsViewController> detailsViewController(
+ base::scoped_nsobject<CookieDetailsViewController> detailsViewController(
[[CookieDetailsViewController alloc] init]);
[detailsViewController view];
- scoped_nsobject<CookiePromptContentDetailsAdapter> adapter(
+ base::scoped_nsobject<CookiePromptContentDetailsAdapter> adapter(
[CreateCookieTestContent(YES) retain]);
[detailsViewController.get() setContentObject:adapter.get()];
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h b/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h
index 2b95914..1af0a75 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h
@@ -4,14 +4,14 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/browsing_data/cookies_tree_model.h"
#include "chrome/browser/ui/cocoa/content_settings/cookie_details.h"
@interface CocoaCookieTreeNode : NSObject {
- scoped_nsobject<NSString> title_;
- scoped_nsobject<NSMutableArray> children_;
- scoped_nsobject<CocoaCookieDetails> details_;
+ base::scoped_nsobject<NSString> title_;
+ base::scoped_nsobject<NSMutableArray> children_;
+ base::scoped_nsobject<CocoaCookieDetails> details_;
CookieTreeNode* treeNode_; // weak
}
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.mm b/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.mm
index a459194..44b97d0 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_tree_node.mm
@@ -43,7 +43,7 @@
children_.reset([[NSMutableArray alloc] initWithCapacity:childCount]);
for (int i = 0; i < childCount; ++i) {
CookieTreeNode* child = treeNode_->GetChild(i);
- scoped_nsobject<CocoaCookieTreeNode> childNode(
+ base::scoped_nsobject<CocoaCookieTreeNode> childNode(
[[CocoaCookieTreeNode alloc] initWithNode:child]);
[children_ addObject:childNode.get()];
}
diff --git a/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm b/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
index ee4a5f8..4f061cd 100644
--- a/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/custom_frame_view_unittest.mm
@@ -6,7 +6,7 @@
#include <objc/runtime.h>
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/custom_frame_view.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -24,7 +24,7 @@ class CustomFrameViewTest : public PlatformTest {
view_.reset([[customFrameClass alloc] initWithFrame:frame]);
}
- scoped_nsobject<NSView> view_;
+ base::scoped_nsobject<NSView> view_;
};
// Test to make sure our class modifications were successful.
diff --git a/chrome/browser/ui/cocoa/dev_tools_controller.h b/chrome/browser/ui/cocoa/dev_tools_controller.h
index 554b8ab..99416e6 100644
--- a/chrome/browser/ui/cocoa/dev_tools_controller.h
+++ b/chrome/browser/ui/cocoa/dev_tools_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/devtools/devtools_window.h"
@class GraySplitView;
@@ -23,7 +23,7 @@ class WebContents;
@interface DevToolsController : NSObject<NSSplitViewDelegate> {
@private
// A view hosting docked devTools contents.
- scoped_nsobject<GraySplitView> splitView_;
+ base::scoped_nsobject<GraySplitView> splitView_;
DevToolsDockSide dockSide_;
diff --git a/chrome/browser/ui/cocoa/dev_tools_controller.mm b/chrome/browser/ui/cocoa/dev_tools_controller.mm
index c495d1f..7c97686 100644
--- a/chrome/browser/ui/cocoa/dev_tools_controller.mm
+++ b/chrome/browser/ui/cocoa/dev_tools_controller.mm
@@ -159,7 +159,7 @@ using content::WebContents;
[devToolsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
NSRect containerRect = NSMakeRect(0, 0, 100, 100);
- scoped_nsobject<NSView> devToolsContainerView(
+ base::scoped_nsobject<NSView> devToolsContainerView(
[[NSView alloc] initWithFrame:containerRect]);
[devToolsContainerView addSubview:devToolsView];
[splitView_ addSubview:devToolsContainerView];
diff --git a/chrome/browser/ui/cocoa/dock_icon.mm b/chrome/browser/ui/cocoa/dock_icon.mm
index d70618d..f6bf5ae 100644
--- a/chrome/browser/ui/cocoa/dock_icon.mm
+++ b/chrome/browser/ui/cocoa/dock_icon.mm
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
@@ -85,7 +85,7 @@ const int64 kUpdateFrequencyMs = 200;
NSColor* backgroundHighlight =
[backgroundColor blendedColorWithFraction:0.85
ofColor:[NSColor whiteColor]];
- scoped_nsobject<NSGradient> backgroundGradient(
+ base::scoped_nsobject<NSGradient> backgroundGradient(
[[NSGradient alloc] initWithStartingColor:backgroundHighlight
endingColor:backgroundColor]);
NSBezierPath* badgeEdge = [NSBezierPath bezierPathWithOvalInRect:badgeRect];
@@ -108,7 +108,7 @@ const int64 kUpdateFrequencyMs = 200;
NSColor* sliceHighlight =
[sliceColor blendedColorWithFraction:0.4
ofColor:[NSColor whiteColor]];
- scoped_nsobject<NSGradient> sliceGradient(
+ base::scoped_nsobject<NSGradient> sliceGradient(
[[NSGradient alloc] initWithStartingColor:sliceHighlight
endingColor:sliceColor]);
NSBezierPath* progressSlice;
@@ -140,7 +140,7 @@ const int64 kUpdateFrequencyMs = 200;
{
gfx::ScopedNSGraphicsContextSaveGState scopedGState;
[[NSColor whiteColor] set];
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowOffset:NSMakeSize(0, -2)];
[shadow setShadowBlurRadius:2];
[shadow set];
@@ -149,12 +149,12 @@ const int64 kUpdateFrequencyMs = 200;
}
// Download count
- scoped_nsobject<NSNumberFormatter> formatter(
+ base::scoped_nsobject<NSNumberFormatter> formatter(
[[NSNumberFormatter alloc] init]);
NSString* countString =
[formatter stringFromNumber:[NSNumber numberWithInt:downloads_]];
- scoped_nsobject<NSShadow> countShadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> countShadow([[NSShadow alloc] init]);
[countShadow setShadowBlurRadius:3.0];
[countShadow.get() setShadowColor:[NSColor whiteColor]];
[countShadow.get() setShadowOffset:NSMakeSize(0.0, 0.0)];
@@ -165,7 +165,7 @@ const int64 kUpdateFrequencyMs = 200;
nil];
CGFloat countFontSize = badgeRadius;
NSSize countSize = NSZeroSize;
- scoped_nsobject<NSAttributedString> countAttrString;
+ base::scoped_nsobject<NSAttributedString> countAttrString;
while (1) {
NSFont* countFont = [NSFont fontWithName:@"Helvetica-Bold"
size:countFontSize];
@@ -207,7 +207,8 @@ const int64 kUpdateFrequencyMs = 200;
if (!icon) {
NSDockTile* dockTile = [[NSApplication sharedApplication] dockTile];
- scoped_nsobject<DockTileView> dockTileView([[DockTileView alloc] init]);
+ base::scoped_nsobject<DockTileView> dockTileView(
+ [[DockTileView alloc] init]);
[dockTile setContentView:dockTileView];
icon = [[DockIcon alloc] init];
diff --git a/chrome/browser/ui/cocoa/download/background_theme.h b/chrome/browser/ui/cocoa/download/background_theme.h
index 7751965..d044fe1 100644
--- a/chrome/browser/ui/cocoa/download/background_theme.h
+++ b/chrome/browser/ui/cocoa/download/background_theme.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/theme_provider.h"
class BackgroundTheme : public ui::ThemeProvider {
@@ -33,9 +33,9 @@ class BackgroundTheme : public ui::ThemeProvider {
private:
ui::ThemeProvider* provider_;
- scoped_nsobject<NSGradient> buttonGradient_;
- scoped_nsobject<NSGradient> buttonPressedGradient_;
- scoped_nsobject<NSColor> borderColor_;
+ base::scoped_nsobject<NSGradient> buttonGradient_;
+ base::scoped_nsobject<NSGradient> buttonPressedGradient_;
+ base::scoped_nsobject<NSColor> borderColor_;
};
#endif // CHROME_BROWSER_UI_COCOA_DOWNLOAD_BACKGROUND_THEME_H_
diff --git a/chrome/browser/ui/cocoa/download/download_item_button.mm b/chrome/browser/ui/cocoa/download/download_item_button.mm
index 67920fe..4bfd70f 100644
--- a/chrome/browser/ui/cocoa/download/download_item_button.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_button.mm
@@ -34,7 +34,7 @@
} else {
// Hold a reference to our controller in case the download completes and we
// represent a file that's auto-removed (e.g. a theme).
- scoped_nsobject<DownloadItemController> ref([controller_ retain]);
+ base::scoped_nsobject<DownloadItemController> ref([controller_ retain]);
[cell setHighlighted:YES];
[[self menu] setDelegate:self];
[NSMenu popUpContextMenu:[self menu]
@@ -46,7 +46,7 @@
// Override to retain the controller, in case a closure is pumped that deletes
// the DownloadItemController while the menu is open <http://crbug.com/129826>.
- (void)rightMouseDown:(NSEvent*)event {
- scoped_nsobject<DownloadItemController> ref([controller_ retain]);
+ base::scoped_nsobject<DownloadItemController> ref([controller_ retain]);
[super rightMouseDown:event];
}
diff --git a/chrome/browser/ui/cocoa/download/download_item_button_unittest.mm b/chrome/browser/ui/cocoa/download/download_item_button_unittest.mm
index 6fc6b43..e6f07e9 100644
--- a/chrome/browser/ui/cocoa/download/download_item_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_button_unittest.mm
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/download/download_item_button.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/download/download_item_button.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
// Make sure nothing leaks.
TEST(DownloadItemButtonTest, Create) {
- scoped_nsobject<DownloadItemButton> button;
+ base::scoped_nsobject<DownloadItemButton> button;
button.reset([[DownloadItemButton alloc]
initWithFrame:NSMakeRect(0,0,500,500)]);
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.h b/chrome/browser/ui/cocoa/download/download_item_cell.h
index c73f9c8..9e01975 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.h
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.h
@@ -30,23 +30,23 @@ enum DownloadItemMousePosition {
// Track which part of the button the mouse is over
DownloadItemMousePosition mousePosition_;
int mouseInsideCount_;
- scoped_nsobject<NSTrackingArea> trackingAreaButton_;
- scoped_nsobject<NSTrackingArea> trackingAreaDropdown_;
+ base::scoped_nsobject<NSTrackingArea> trackingAreaButton_;
+ base::scoped_nsobject<NSTrackingArea> trackingAreaDropdown_;
base::FilePath downloadPath_; // stored unelided
NSString* secondaryTitle_;
NSFont* secondaryFont_;
int percentDone_;
- scoped_nsobject<NSAnimation> completionAnimation_;
+ base::scoped_nsobject<NSAnimation> completionAnimation_;
// In degrees, for downloads with no known total size.
int indeterminateProgressAngle_;
- scoped_nsobject<IndeterminateProgressTimer> indeterminateProgressTimer_;
+ base::scoped_nsobject<IndeterminateProgressTimer> indeterminateProgressTimer_;
BOOL isStatusTextVisible_;
CGFloat titleY_;
CGFloat statusAlpha_;
- scoped_nsobject<NSAnimation> toggleStatusVisibilityAnimation_;
+ base::scoped_nsobject<NSAnimation> toggleStatusVisibilityAnimation_;
scoped_ptr<ui::ThemeProvider> themeProvider_;
}
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm
index 2a47782..f6af374 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm
@@ -96,7 +96,7 @@ using content::DownloadItem;
@interface IndeterminateProgressTimer : NSObject {
@private
DownloadItemCell* cell_;
- scoped_nsobject<NSTimer> timer_;
+ base::scoped_nsobject<NSTimer> timer_;
}
- (id)initWithDownloadItemCell:(DownloadItemCell*)cell;
@@ -621,7 +621,7 @@ using content::DownloadItem;
gfx::ScopedNSGraphicsContextSaveGState scopedGState;
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowColor:[NSColor whiteColor]];
[shadow.get() setShadowOffset:NSMakeSize(0, -1)];
[shadow setShadowBlurRadius:0.0];
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm b/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
index b68f36f..ef4aa54 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/download/download_item_model.h"
-#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
#include "content/public/test/mock_download_item.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -32,8 +32,8 @@ class DownloadItemCellTest : public CocoaTest {
}
protected:
- scoped_nsobject<DownloadItemCell> cell_;
- scoped_nsobject<NSButton> button_;
+ base::scoped_nsobject<DownloadItemCell> cell_;
+ base::scoped_nsobject<NSButton> button_;
private:
DISALLOW_COPY_AND_ASSIGN(DownloadItemCellTest);
diff --git a/chrome/browser/ui/cocoa/download/download_item_mac.h b/chrome/browser/ui/cocoa/download/download_item_mac.h
index 363dd33..2bbd754 100644
--- a/chrome/browser/ui/cocoa/download/download_item_mac.h
+++ b/chrome/browser/ui/cocoa/download/download_item_mac.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/icon_manager.h"
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.h b/chrome/browser/ui/cocoa/download/download_shelf_controller.h
index a71cf8e..c264571 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.h
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.h
@@ -4,10 +4,10 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/base/cocoa/tracking_area.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
+#include "ui/base/cocoa/tracking_area.h"
@class AnimatableView;
class Browser;
@@ -71,7 +71,7 @@ class PageNavigator;
ui::ScopedCrTrackingArea trackingArea_;
// The download items we have added to our shelf.
- scoped_nsobject<NSMutableArray> downloadItemControllers_;
+ base::scoped_nsobject<NSMutableArray> downloadItemControllers_;
// The container that contains (and clamps) all the download items.
IBOutlet NSView* itemContainerView_;
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index e0b8eae..be8355b 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -300,7 +300,7 @@ const NSSize kHoverCloseButtonDefaultSize = { 18, 18 };
- (void)addDownloadItem:(DownloadItem*)downloadItem {
DCHECK([NSThread isMainThread]);
- scoped_nsobject<DownloadItemController> controller(
+ base::scoped_nsobject<DownloadItemController> controller(
[[DownloadItemController alloc] initWithDownload:downloadItem
shelf:self
navigator:navigator_]);
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
index ed952c34..8ce96cad 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
@@ -110,8 +110,8 @@ class DownloadShelfControllerTest : public CocoaProfileTest {
protected:
id CreateItemController();
- scoped_nsobject<CountingDownloadShelfController> shelf_;
- scoped_nsobject<ViewResizerPong> resize_delegate_;
+ base::scoped_nsobject<CountingDownloadShelfController> shelf_;
+ base::scoped_nsobject<ViewResizerPong> resize_delegate_;
};
id DownloadShelfControllerTest::CreateItemController() {
@@ -122,12 +122,12 @@ id DownloadShelfControllerTest::CreateItemController() {
ON_CALL(*download.get(), GetState())
.WillByDefault(Return(content::DownloadItem::IN_PROGRESS));
- scoped_nsobject<WrappedMockDownloadItem> wrappedMockDownload(
+ base::scoped_nsobject<WrappedMockDownloadItem> wrappedMockDownload(
[[WrappedMockDownloadItem alloc] initWithMockDownload:download.Pass()]);
id item_controller =
[OCMockObject mockForClass:[DownloadItemController class]];
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
[[[item_controller stub] andCall:@selector(download)
onObject:wrappedMockDownload.get()] download];
[[item_controller stub] updateVisibility:[OCMArg any]];
@@ -144,7 +144,7 @@ TEST_VIEW(DownloadShelfControllerTest, [shelf_ view]);
// Removing the last download from the shelf should cause it to close
// immediately.
TEST_F(DownloadShelfControllerTest, AddAndRemoveDownload) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -160,8 +160,8 @@ TEST_F(DownloadShelfControllerTest, AddAndRemoveDownload) {
// Test that the shelf doesn't close automatically after a removal if there are
// active download items still on the shelf.
TEST_F(DownloadShelfControllerTest, AddAndRemoveWithActiveItem) {
- scoped_nsobject<DownloadItemController> item1(CreateItemController());
- scoped_nsobject<DownloadItemController> item2(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item1(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item2(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -177,7 +177,7 @@ TEST_F(DownloadShelfControllerTest, AddAndRemoveWithActiveItem) {
// DownloadShelf::Unhide() should cause the shelf to be displayed if there are
// active downloads on it.
TEST_F(DownloadShelfControllerTest, HideAndUnhide) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -193,7 +193,7 @@ TEST_F(DownloadShelfControllerTest, HideAndUnhide) {
// DownloadShelf::Unhide() shouldn't cause the shelf to be displayed if all
// active downloads are removed from the shelf while the shelf was hidden.
TEST_F(DownloadShelfControllerTest, HideAutocloseUnhide) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -209,7 +209,7 @@ TEST_F(DownloadShelfControllerTest, HideAutocloseUnhide) {
// Test of autoclosing behavior after opening a download item. The mouse is on
// the download shelf at the time the autoclose is scheduled.
TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseInShelf) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -246,7 +246,7 @@ TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseInShelf) {
// Test of autoclosing behavior after opening a download item.
TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseOffShelf) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -265,7 +265,7 @@ TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseOffShelf) {
// Test that if the shelf is closed while an autoClose is pending, the pending
// autoClose is cancelled.
TEST_F(DownloadShelfControllerTest, CloseWithPendingAutoClose) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -306,7 +306,7 @@ TEST_F(DownloadShelfControllerTest, CloseWithPendingAutoClose) {
// That that the shelf cancels a pending autoClose if a new download item is
// added to it.
TEST_F(DownloadShelfControllerTest, AddItemWithPendingAutoClose) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
@@ -337,7 +337,7 @@ TEST_F(DownloadShelfControllerTest, AddItemWithPendingAutoClose) {
EXPECT_EQ(0, shelf_.get()->cancelAutoCloseCount_);
// Add a new download item. The pending autoClose should be cancelled.
- scoped_nsobject<DownloadItemController> item2(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item2(CreateItemController());
[shelf_ add:item.get()];
EXPECT_EQ(1, shelf_.get()->scheduleAutoCloseCount_);
EXPECT_EQ(1, shelf_.get()->cancelAutoCloseCount_);
@@ -346,7 +346,7 @@ TEST_F(DownloadShelfControllerTest, AddItemWithPendingAutoClose) {
// Test that pending autoClose calls are cancelled when exiting.
TEST_F(DownloadShelfControllerTest, CancelAutoCloseOnExit) {
- scoped_nsobject<DownloadItemController> item(CreateItemController());
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[shelf_ showDownloadShelf:YES
isUserAction:NO];
EXPECT_TRUE([shelf_ isVisible]);
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm b/chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm
index 32354e2..c38dedf 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "chrome/browser/ui/cocoa/download/download_shelf_mac.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,7 +56,7 @@ class DownloadShelfMacTest : public CocoaProfileTest {
}
protected:
- scoped_nsobject<FakeDownloadShelfController> shelf_controller_;
+ base::scoped_nsobject<FakeDownloadShelfController> shelf_controller_;
};
TEST_F(DownloadShelfMacTest, CreationDoesNotCallShow) {
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_view.mm b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
index d5a6743..203b66c 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_view.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/download/download_shelf_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#import "chrome/browser/ui/cocoa/nsview_additions.h"
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_view_unittest.mm b/chrome/browser/ui/cocoa/download/download_shelf_view_unittest.mm
index b7263fc..cf22c69 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/download/download_shelf_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -16,7 +16,8 @@ class DownloadShelfViewTest : public CocoaTest {
// This class only needs to do one thing: prevent mouse down events from moving
// the parent window around.
TEST_F(DownloadShelfViewTest, CanDragWindow) {
- scoped_nsobject<DownloadShelfView> view([[DownloadShelfView alloc] init]);
+ base::scoped_nsobject<DownloadShelfView> view(
+ [[DownloadShelfView alloc] init]);
EXPECT_FALSE([view mouseDownCanMoveWindow]);
}
diff --git a/chrome/browser/ui/cocoa/draggable_button.h b/chrome/browser/ui/cocoa/draggable_button.h
index 5e126b2..0cd0d9b 100644
--- a/chrome/browser/ui/cocoa/draggable_button.h
+++ b/chrome/browser/ui/cocoa/draggable_button.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/draggable_button_mixin.h"
// Class for buttons that can be drag sources. If the mouse is clicked and moved
@@ -15,7 +15,7 @@
// |-performClick:|. Subclasses should override these two methods.
@interface DraggableButton : NSButton<DraggableButtonMixin> {
@private
- scoped_nsobject<DraggableButtonImpl> draggableButtonImpl_;
+ base::scoped_nsobject<DraggableButtonImpl> draggableButtonImpl_;
}
@property(readonly, nonatomic) DraggableButtonImpl* draggableButton;
diff --git a/chrome/browser/ui/cocoa/draggable_button.mm b/chrome/browser/ui/cocoa/draggable_button.mm
index 1eb7d7d..0b3bcd8 100644
--- a/chrome/browser/ui/cocoa/draggable_button.mm
+++ b/chrome/browser/ui/cocoa/draggable_button.mm
@@ -39,7 +39,7 @@
// The impl spins an event loop to distinguish clicks from drags,
// which could result in our destruction. Wire ourselves down for
// the duration.
- scoped_nsobject<DraggableButton> keepAlive([self retain]);
+ base::scoped_nsobject<DraggableButton> keepAlive([self retain]);
if ([draggableButtonImpl_ mouseDownImpl:theEvent] ==
kDraggableButtonMixinCallSuper) {
diff --git a/chrome/browser/ui/cocoa/draggable_button_mixin.mm b/chrome/browser/ui/cocoa/draggable_button_mixin.mm
index e28f674..934e429 100644
--- a/chrome/browser/ui/cocoa/draggable_button_mixin.mm
+++ b/chrome/browser/ui/cocoa/draggable_button_mixin.mm
@@ -7,7 +7,7 @@
#include <cmath>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/draggable_button_unittest.mm b/chrome/browser/ui/cocoa/draggable_button_unittest.mm
index 6ee44a4..3cada7e 100644
--- a/chrome/browser/ui/cocoa/draggable_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/draggable_button_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/draggable_button.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -47,8 +47,9 @@ class DraggableButtonTest : public CocoaTest {};
// Make sure the basic case of "click" still works.
TEST_F(DraggableButtonTest, DownUp) {
- scoped_nsobject<TestableDraggableButton> button(
- [[TestableDraggableButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
+ base::scoped_nsobject<TestableDraggableButton> button(
+ [[TestableDraggableButton alloc]
+ initWithFrame:NSMakeRect(0, 0, 500, 500)]);
[[test_window() contentView] addSubview:button.get()];
[button setTarget:button];
[button setAction:@selector(trigger:)];
@@ -67,8 +68,9 @@ TEST_F(DraggableButtonTest, DownUp) {
}
TEST_F(DraggableButtonTest, DraggableHysteresis) {
- scoped_nsobject<TestableDraggableButton> button(
- [[TestableDraggableButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
+ base::scoped_nsobject<TestableDraggableButton> button(
+ [[TestableDraggableButton alloc]
+ initWithFrame:NSMakeRect(0, 0, 500, 500)]);
[[test_window() contentView] addSubview:button.get()];
NSEvent* downEvent =
cocoa_test_event_utils::MouseEventAtPoint(NSMakePoint(10,10),
@@ -106,8 +108,9 @@ TEST_F(DraggableButtonTest, DraggableHysteresis) {
}
TEST_F(DraggableButtonTest, ResetState) {
- scoped_nsobject<TestableDraggableButton> button(
- [[TestableDraggableButton alloc] initWithFrame:NSMakeRect(0,0,500,500)]);
+ base::scoped_nsobject<TestableDraggableButton> button(
+ [[TestableDraggableButton alloc]
+ initWithFrame:NSMakeRect(0, 0, 500, 500)]);
[[test_window() contentView] addSubview:button.get()];
NSEvent* downEvent =
cocoa_test_event_utils::MouseEventAtPoint(NSMakePoint(10,10),
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.h b/chrome/browser/ui/cocoa/extensions/browser_action_button.h
index 7a083d3..fa5a46b 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.h
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
@@ -31,7 +31,7 @@ extern NSString* const kBrowserActionButtonDragEndNotification;
scoped_ptr<ExtensionActionIconFactoryBridge> iconFactoryBridge_;
// Used to move the button and query whether a button is currently animating.
- scoped_nsobject<NSViewAnimation> moveAnimation_;
+ base::scoped_nsobject<NSViewAnimation> moveAnimation_;
// The extension for this button. Weak.
const extensions::Extension* extension_;
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
index c6b1fa6..b528c70 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm
@@ -7,7 +7,7 @@
#include <algorithm>
#include "base/basictypes.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/view_id_util.h"
NSString* const kBrowserActionGrippyDragStartedNotification =
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm
index 14b5c1b..8e8d077 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +21,7 @@ class BrowserActionsContainerViewTest : public CocoaTest {
initWithFrame:NSMakeRect(0, 0, 0, kContainerHeight)]);
}
- scoped_nsobject<BrowserActionsContainerView> view_;
+ base::scoped_nsobject<BrowserActionsContainerView> view_;
};
TEST_F(BrowserActionsContainerViewTest, BasicTests) {
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h
index f24a8d1..37cd3f0 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
class Browser;
@@ -52,19 +52,19 @@ extern NSString* const kBrowserActionVisibilityChangedNotification;
// A dictionary of Extension ID -> BrowserActionButton pairs representing the
// buttons present in the container view. The ID is a string unique to each
// extension.
- scoped_nsobject<NSMutableDictionary> buttons_;
+ base::scoped_nsobject<NSMutableDictionary> buttons_;
// Array of hidden buttons in the correct order in which the user specified.
- scoped_nsobject<NSMutableArray> hiddenButtons_;
+ base::scoped_nsobject<NSMutableArray> hiddenButtons_;
// The currently running chevron animation (fade in/out).
- scoped_nsobject<NSViewAnimation> chevronAnimation_;
+ base::scoped_nsobject<NSViewAnimation> chevronAnimation_;
// The chevron button used when Browser Actions are hidden.
- scoped_nsobject<MenuButton> chevronMenuButton_;
+ base::scoped_nsobject<MenuButton> chevronMenuButton_;
// The Browser Actions overflow menu.
- scoped_nsobject<NSMenu> overflowMenu_;
+ base::scoped_nsobject<NSMenu> overflowMenu_;
}
@property(readonly, nonatomic) BrowserActionsContainerView* containerView;
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h
index b6b50f8..6c08460 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
class AsyncUninstaller;
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm
index a92c9cc..7aee38c 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_browsertest.mm
@@ -64,7 +64,7 @@ public:
IN_PROC_BROWSER_TEST_F(ExtensionActionContextMenuTest, BasicTest) {
SetupPageAction();
- scoped_nsobject<ExtensionActionContextMenu> menu;
+ base::scoped_nsobject<ExtensionActionContextMenu> menu;
menu.reset([[ExtensionActionContextMenu alloc] initWithExtension:extension_
browser:browser()
extensionAction:action_]);
@@ -103,7 +103,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionActionContextMenuTest, BrowserAction) {
new Browser(Browser::CreateParams(browser()->profile(),
browser()->host_desktop_type())));
- scoped_nsobject<ExtensionActionContextMenu> menu;
+ base::scoped_nsobject<ExtensionActionContextMenu> menu;
menu.reset([[ExtensionActionContextMenu alloc]
initWithExtension:extension_
browser:empty_browser
@@ -158,7 +158,7 @@ class DevToolsAttachedObserver {
IN_PROC_BROWSER_TEST_F(
ExtensionActionContextMenuTest, DISABLED_RunInspectPopup) {
SetupPageAction();
- scoped_nsobject<ExtensionActionContextMenu> menu;
+ base::scoped_nsobject<ExtensionActionContextMenu> menu;
menu.reset([[ExtensionActionContextMenu alloc] initWithExtension:extension_
browser:browser()
extensionAction:action_]);
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
index c9ada3a..18478ab 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -46,7 +46,7 @@ class ExtensionInstallDialogController :
private:
ExtensionInstallPrompt::Delegate* delegate_;
- scoped_nsobject<ExtensionInstallViewController> view_controller_;
+ base::scoped_nsobject<ExtensionInstallViewController> view_controller_;
scoped_ptr<ConstrainedWindowMac> constrained_window_;
};
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
index eb08510..066f3f4 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm
@@ -42,13 +42,12 @@ ExtensionInstallDialogController::ExtensionInstallDialogController(
delegate:this
prompt:prompt]);
- scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
+ base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
initWithContentRect:[[view_controller_ view] bounds]]);
[[window contentView] addSubview:[view_controller_ view]];
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
- [[CustomConstrainedWindowSheet alloc]
- initWithCustomWindow:window]);
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
constrained_window_.reset(new ConstrainedWindowMac(
this, show_params.parent_web_contents, sheet));
}
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm
index 402dcfb..9c46502 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm
@@ -37,7 +37,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogControllerTest, BasicTest) {
&delegate,
prompt);
- scoped_nsobject<NSWindow> window(
+ base::scoped_nsobject<NSWindow> window(
[[[controller->view_controller() view] window] retain]);
EXPECT_TRUE([window isVisible]);
@@ -61,7 +61,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogControllerTest, Permissions) {
&delegate,
prompt);
- scoped_nsobject<NSWindow> window(
+ base::scoped_nsobject<NSWindow> window(
[[[controller->view_controller() view] window] retain]);
EXPECT_TRUE([window isVisible]);
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h
index ba3f192..3ba7292 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h
@@ -9,7 +9,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
@@ -45,7 +45,7 @@ class PageNavigator;
ExtensionInstallPrompt::Delegate* delegate_; // weak
scoped_ptr<ExtensionInstallPrompt::Prompt> prompt_;
- scoped_nsobject<NSArray> warnings_;
+ base::scoped_nsobject<NSArray> warnings_;
BOOL isComputingRowHeight_;
}
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
index 088f5ff..edd9c0d 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
@@ -314,7 +314,8 @@ void DrawBulletInFrame(NSRect frame) {
NSImage* image = gfx::NSImageFromImageSkiaWithColorSpace(
*skiaImage, base::mac::GetSystemColorSpace());
NSRect frame = NSMakeRect(0, 0, skiaImage->width(), skiaImage->height());
- scoped_nsobject<NSImageView> view([[NSImageView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSImageView> view(
+ [[NSImageView alloc] initWithFrame:frame]);
[view setImage:image];
// Add this star after all the other ones
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm
index ed72350..a899064 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/extensions/extension_install_prompt.h"
@@ -40,11 +40,10 @@ TEST_F(ExtensionInstallViewControllerTest, BasicsNormalCancel) {
permissions.push_back(UTF8ToUTF16("warning 1"));
prompt.SetPermissions(permissions);
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc] initWithNavigator:browser()
+ delegate:&delegate
+ prompt:prompt]);
[controller view]; // Force nib load.
@@ -93,11 +92,10 @@ TEST_F(ExtensionInstallViewControllerTest, BasicsNormalOK) {
permissions.push_back(UTF8ToUTF16("warning 1"));
prompt.SetPermissions(permissions);
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc] initWithNavigator:browser()
+ delegate:&delegate
+ prompt:prompt]);
[controller view]; // Force nib load.
[controller ok:nil];
@@ -123,19 +121,19 @@ TEST_F(ExtensionInstallViewControllerTest, MultipleWarnings) {
permissions.push_back(UTF8ToUTF16("warning 2"));
two_warnings_prompt.SetPermissions(permissions);
- scoped_nsobject<ExtensionInstallViewController>
- controller1([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate1
- prompt:one_warning_prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller1(
+ [[ExtensionInstallViewController alloc]
+ initWithNavigator:browser()
+ delegate:&delegate1
+ prompt:one_warning_prompt]);
[controller1 view]; // Force nib load.
- scoped_nsobject<ExtensionInstallViewController>
- controller2([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate2
- prompt:two_warnings_prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller2(
+ [[ExtensionInstallViewController alloc]
+ initWithNavigator:browser()
+ delegate:&delegate2
+ prompt:two_warnings_prompt]);
[controller2 view]; // Force nib load.
@@ -158,11 +156,11 @@ TEST_F(ExtensionInstallViewControllerTest, BasicsSkinny) {
ExtensionInstallPrompt::Prompt no_warnings_prompt =
chrome::BuildExtensionInstallPrompt(extension_.get());
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:no_warnings_prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc]
+ initWithNavigator:browser()
+ delegate:&delegate
+ prompt:no_warnings_prompt]);
[controller view]; // Force nib load.
@@ -202,11 +200,10 @@ TEST_F(ExtensionInstallViewControllerTest, BasicsInline) {
inline_prompt.set_extension(extension_.get());
inline_prompt.set_icon(chrome::LoadInstallPromptIcon());
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:inline_prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc] initWithNavigator:browser()
+ delegate:&delegate
+ prompt:inline_prompt]);
[controller view]; // Force nib load.
@@ -265,11 +262,10 @@ TEST_F(ExtensionInstallViewControllerTest, OAuthIssues) {
issues.push_back(issue);
prompt.SetOAuthIssueAdvice(issues);
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc] initWithNavigator:browser()
+ delegate:&delegate
+ prompt:prompt]);
[controller view]; // Force nib load.
NSOutlineView* outlineView = [controller outlineView];
@@ -290,11 +286,10 @@ TEST_F(ExtensionInstallViewControllerTest, PostInstallPermissionsPrompt) {
permissions.push_back(UTF8ToUTF16("warning 1"));
prompt.SetPermissions(permissions);
- scoped_nsobject<ExtensionInstallViewController>
- controller([[ExtensionInstallViewController alloc]
- initWithNavigator:browser()
- delegate:&delegate
- prompt:prompt]);
+ base::scoped_nsobject<ExtensionInstallViewController> controller(
+ [[ExtensionInstallViewController alloc] initWithNavigator:browser()
+ delegate:&delegate
+ prompt:prompt]);
[controller view]; // Force nib load.
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
index 803a77d..aec6898 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.h
@@ -60,7 +60,7 @@ typedef enum {
const extensions::Extension* extension_; // weak
const extensions::BundleInstaller* bundle_; // weak
Browser* browser_; // weak
- scoped_nsobject<NSImage> icon_;
+ base::scoped_nsobject<NSImage> icon_;
extension_installed_bubble::ExtensionType type_;
@@ -91,7 +91,7 @@ typedef enum {
// text views cannot conveniently be created in IB. The xib file contains
// a text field |promoPlaceholder_| that's replaced by this text view |promo_|
// in -awakeFromNib.
- scoped_nsobject<HyperlinkTextView> promo_;
+ base::scoped_nsobject<HyperlinkTextView> promo_;
// Only shown for bundle installs.
IBOutlet NSTextField* installedHeadingMsg_;
IBOutlet NSTextField* installedItemsMsg_;
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.h b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.h
index 782505d..014f0a4 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index b2af054..d5dc47a 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -149,12 +149,11 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
anchoredAt:(NSPoint)anchoredAt
arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation
devMode:(BOOL)devMode {
- scoped_nsobject<InfoBubbleWindow> window(
- [[InfoBubbleWindow alloc]
- initWithContentRect:ui::kWindowSizeDeterminedLater
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:YES]);
+ base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
+ initWithContentRect:ui::kWindowSizeDeterminedLater
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:YES]);
if (!window.get())
return nil;
diff --git a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h
index 74e39cb..54559af 100644
--- a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h
+++ b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h
@@ -74,22 +74,22 @@ class MediaGalleriesDialogCocoa : public ConstrainedWindowMacDelegate,
scoped_ptr<ConstrainedWindowMac> window_;
// The alert that the dialog is being displayed as.
- scoped_nsobject<ConstrainedWindowAlert> alert_;
+ base::scoped_nsobject<ConstrainedWindowAlert> alert_;
// True if the user has pressed accept.
bool accepted_;
// List of checkboxes ordered from bottom to top.
- scoped_nsobject<NSMutableArray> checkboxes_;
+ base::scoped_nsobject<NSMutableArray> checkboxes_;
// Container view for checkboxes.
- scoped_nsobject<NSView> checkbox_container_;
+ base::scoped_nsobject<NSView> checkbox_container_;
// Container view for the main dialog contents.
- scoped_nsobject<NSBox> accessory_;
+ base::scoped_nsobject<NSBox> accessory_;
// An Objective-C class to route callbacks from Cocoa code.
- scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_;
+ base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_;
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa);
};
diff --git a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm
index 807a666..5e9940c 100644
--- a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm
@@ -98,7 +98,7 @@ MediaGalleriesDialogCocoa::MediaGalleriesDialogCocoa(
// May be NULL during tests.
if (controller->web_contents()) {
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[alert_ window]]);
window_.reset(new ConstrainedWindowMac(
@@ -121,9 +121,8 @@ void MediaGalleriesDialogCocoa::InitDialogControls() {
blue:0.625
alpha:1.0]];
- scoped_nsobject<NSScrollView> scroll_view(
- [[NSScrollView alloc] initWithFrame:NSMakeRect(
- 0, 0, kCheckboxMaxWidth, kScrollAreaHeight)]);
+ base::scoped_nsobject<NSScrollView> scroll_view([[NSScrollView alloc]
+ initWithFrame:NSMakeRect(0, 0, kCheckboxMaxWidth, kScrollAreaHeight)]);
[scroll_view setHasVerticalScroller:YES];
[scroll_view setHasHorizontalScroller:NO];
[scroll_view setBorderType:NSNoBorder];
@@ -203,7 +202,8 @@ CGFloat MediaGalleriesDialogCocoa::CreateUnattachedCheckboxes(
}
CGFloat MediaGalleriesDialogCocoa::CreateCheckboxSeparator(CGFloat y_pos) {
- scoped_nsobject<NSBox> separator([[NSBox alloc] initWithFrame:NSMakeRect(
+ base::scoped_nsobject<NSBox> separator(
+ [[NSBox alloc] initWithFrame:NSMakeRect(
0, y_pos + kCheckboxMargin * 0.5, kCheckboxMaxWidth, 1.0)]);
[separator setBoxType:NSBoxSeparator];
[separator setBorderType:NSLineBorder];
@@ -211,7 +211,7 @@ CGFloat MediaGalleriesDialogCocoa::CreateCheckboxSeparator(CGFloat y_pos) {
[checkbox_container_ addSubview:separator];
y_pos += kCheckboxMargin * 0.5 + 4;
- scoped_nsobject<NSTextField> unattached_label(
+ base::scoped_nsobject<NSTextField> unattached_label(
[[NSTextField alloc] initWithFrame:NSZeroRect]);
[unattached_label setEditable:NO];
[unattached_label setSelectable:NO];
@@ -288,7 +288,7 @@ void MediaGalleriesDialogCocoa::UpdateGalleryCheckbox(
const MediaGalleryPrefInfo& gallery,
bool permitted,
CGFloat y_pos) {
- scoped_nsobject<NSButton> checkbox(
+ base::scoped_nsobject<NSButton> checkbox(
[[NSButton alloc] initWithFrame:NSZeroRect]);
NSString* unique_id = GetUniqueIDForGallery(gallery);
[[checkbox cell] setRepresentedObject:unique_id];
@@ -311,8 +311,8 @@ void MediaGalleriesDialogCocoa::UpdateGalleryCheckbox(
[checkbox setFrame:rect];
[checkbox_container_ addSubview:checkbox];
- scoped_nsobject<NSTextField> details(
- [[NSTextField alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSTextField> details(
+ [[NSTextField alloc] initWithFrame:NSZeroRect]);
[details setEditable:NO];
[details setSelectable:NO];
[details setBezeled:NO];
@@ -355,7 +355,7 @@ void MediaGalleriesDialogCocoa::OnConstrainedWindowClosed(
// static
MediaGalleriesDialog* MediaGalleriesDialog::Create(
MediaGalleriesDialogController* controller) {
- scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller(
+ base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller(
[[MediaGalleriesCocoaController alloc] init]);
return new MediaGalleriesDialogCocoa(controller, cocoa_controller);
}
diff --git a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm
index 19b09ab..81dca35 100644
--- a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm
+++ b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm
@@ -44,7 +44,7 @@ IN_PROC_BROWSER_TEST_F(MediaGalleriesDialogBrowserTest, Close) {
scoped_ptr<MediaGalleriesDialogCocoa> dialog(
static_cast<MediaGalleriesDialogCocoa*>(
MediaGalleriesDialog::Create(&controller)));
- scoped_nsobject<NSWindow> window([[dialog->alert_ window] retain]);
+ base::scoped_nsobject<NSWindow> window([[dialog->alert_ window] retain]);
EXPECT_TRUE([window isVisible]);
WebContentsModalDialogManager* web_contents_modal_dialog_manager =
diff --git a/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h b/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h
index f92d833..e32534e 100644
--- a/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
#include "chrome/browser/ui/extensions/native_app_window.h"
@@ -159,7 +159,7 @@ class NativeAppWindowCocoa : public NativeAppWindow {
gfx::Size max_size_;
bool resizable_;
- scoped_nsobject<NativeAppWindowController> window_controller_;
+ base::scoped_nsobject<NativeAppWindowController> window_controller_;
NSInteger attention_request_id_; // identifier from requestUserAttention
// Indicates whether system drag or custom drag should be used, depending on
diff --git a/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm
index 460ac10..583f7e9 100644
--- a/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm
@@ -226,7 +226,7 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
NSTexturedBackgroundWindowMask;
if (resizable_)
style_mask |= NSResizableWindowMask;
- scoped_nsobject<NSWindow> window;
+ base::scoped_nsobject<NSWindow> window;
if (has_frame_) {
window.reset([[ShellNSWindow alloc]
initWithContentRect:cocoa_bounds
@@ -656,7 +656,7 @@ void NativeAppWindowCocoa::InstallDraggableRegionViews() {
// Note that [webView subviews] returns the view's mutable internal array and
// it should be copied to avoid mutating the original array while enumerating
// it.
- scoped_nsobject<NSArray> subviews([[webView subviews] copy]);
+ base::scoped_nsobject<NSArray> subviews([[webView subviews] copy]);
for (NSView* subview in subviews.get())
if ([subview isKindOfClass:[ControlRegionView class]])
[subview removeFromSuperview];
@@ -667,7 +667,7 @@ void NativeAppWindowCocoa::InstallDraggableRegionViews() {
system_drag_exclude_areas_.begin();
iter != system_drag_exclude_areas_.end();
++iter) {
- scoped_nsobject<NSView> controlRegion(
+ base::scoped_nsobject<NSView> controlRegion(
[[ControlRegionView alloc] initWithAppWindow:this]);
[controlRegion setFrame:NSMakeRect(iter->x(),
webViewHeight - iter->bottom(),
diff --git a/chrome/browser/ui/cocoa/fast_resize_view_unittest.mm b/chrome/browser/ui/cocoa/fast_resize_view_unittest.mm
index 02ac295..edfea60 100644
--- a/chrome/browser/ui/cocoa/fast_resize_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/fast_resize_view_unittest.mm
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/fast_resize_view.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/fast_resize_view.h"
namespace {
@@ -12,12 +12,13 @@ class FastResizeViewTest : public CocoaTest {
public:
FastResizeViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<FastResizeView> view(
+ base::scoped_nsobject<FastResizeView> view(
[[FastResizeView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
- scoped_nsobject<NSView> childView([[NSView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSView> childView(
+ [[NSView alloc] initWithFrame:frame]);
childView_ = childView.get();
[view_ addSubview:childView_];
}
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h
index e5c482b..4c5a018 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "ui/gfx/point.h"
@@ -33,19 +33,19 @@ class FindNotificationDetails;
Browser* browser_;
- scoped_nsobject<FocusTracker> focusTracker_;
+ base::scoped_nsobject<FocusTracker> focusTracker_;
// The show/hide animation. This is defined to be non-nil if the
// animation is running, and is always nil otherwise. The
// FindBarCocoaController should not be deallocated while an animation is
// running (stopAnimation is currently called before the last tab in a
// window is removed).
- scoped_nsobject<NSViewAnimation> showHideAnimation_;
+ base::scoped_nsobject<NSViewAnimation> showHideAnimation_;
// The horizontal-moving animation, to avoid occluding find results. This
// is nil when the animation is not running, and is also stopped by
// stopAnimation.
- scoped_nsobject<NSViewAnimation> moveAnimation_;
+ base::scoped_nsobject<NSViewAnimation> moveAnimation_;
// If YES, do nothing as a result of find pasteboard update notifications.
BOOL suppressPboardUpdateActions_;
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller_unittest.mm
index 20aae91..9cd4db5 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller_unittest.mm
@@ -53,7 +53,7 @@ class FindBarCocoaControllerTest : public CocoaTest {
}
protected:
- scoped_nsobject<FindBarCocoaController> controller_;
+ base::scoped_nsobject<FindBarCocoaController> controller_;
};
TEST_VIEW(FindBarCocoaControllerTest, [controller_ view])
@@ -110,7 +110,7 @@ TEST_F(FindBarCocoaControllerTest, ResultLabelUpdatesCorrectly) {
}
TEST_F(FindBarCocoaControllerTest, FindTextIsGlobal) {
- scoped_nsobject<FindBarCocoaController> otherController(
+ base::scoped_nsobject<FindBarCocoaController> otherController(
[[FindBarCocoaController alloc] initWithBrowser:nil]);
[[test_window() contentView] addSubview:[otherController view]];
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h
index ec61dc5..130009f 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h
@@ -6,14 +6,14 @@
#import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// FindBarTextFieldCell extends StyledTextFieldCell to provide support for a
// results label rooted at the right edge of the cell.
@interface FindBarTextFieldCell : StyledTextFieldCell {
@private
// Set if there is a results label to display on the right side of the cell.
- scoped_nsobject<NSAttributedString> resultsString_;
+ base::scoped_nsobject<NSAttributedString> resultsString_;
}
// Sets the results label to the localized equivalent of "X of Y".
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.mm
index 3d2095c..82b0bf0 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.mm
@@ -57,7 +57,7 @@ CGFloat WidthForResults(NSAttributedString* resultsString) {
// Convenience for the attributes used in the right-justified info
// cells. Sets the background color to red if |foundMatches| is YES.
- (NSDictionary*)resultsAttributes:(BOOL)foundMatches {
- scoped_nsobject<NSMutableParagraphStyle> style(
+ base::scoped_nsobject<NSMutableParagraphStyle> style(
[[NSMutableParagraphStyle alloc] init]);
[style setAlignment:NSRightTextAlignment];
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell_unittest.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell_unittest.mm
index 8b33d2a..249ff56 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell_unittest.mm
@@ -4,9 +4,9 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -36,13 +36,13 @@ class FindBarTextFieldCellTest : public CocoaTest {
// decorations.
const NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<FindBarTextFieldCell> cell(
+ base::scoped_nsobject<FindBarTextFieldCell> cell(
[[FindBarTextFieldCell alloc] initTextCell:@"Testing"]);
cell_ = cell;
[cell_ setEditable:YES];
[cell_ setBordered:YES];
- scoped_nsobject<NSTextField> view(
+ base::scoped_nsobject<NSTextField> view(
[[NSTextField alloc] initWithFrame:frame]);
view_ = view;
[view_ setCell:cell_];
@@ -81,12 +81,12 @@ TEST_F(FindBarTextFieldCellTest, FocusedDisplay) {
// appropriately.
TEST_F(FindBarTextFieldCellTest, SetAndClearFindResults) {
[cell_ setActiveMatch:10 of:30];
- scoped_nsobject<NSAttributedString> tenString(
+ base::scoped_nsobject<NSAttributedString> tenString(
[[cell_ resultsAttributedString] copy]);
EXPECT_GT([tenString length], 0U);
[cell_ setActiveMatch:0 of:0];
- scoped_nsobject<NSAttributedString> zeroString(
+ base::scoped_nsobject<NSAttributedString> zeroString(
[[cell_ resultsAttributedString] copy]);
EXPECT_GT([zeroString length], 0U);
EXPECT_FALSE([tenString isEqualToAttributedString:zeroString]);
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm
index d205efb..30bc8d6 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm
@@ -4,10 +4,10 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -23,7 +23,7 @@ class FindBarTextFieldTest : public CocoaTest {
// Make sure this is wide enough to play games with the cell
// decorations.
NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<FindBarTextField> field(
+ base::scoped_nsobject<FindBarTextField> field(
[[FindBarTextField alloc] initWithFrame:frame]);
field_ = field.get();
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_view_unittest.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_view_unittest.mm
index 3714aa5..6f6ea80 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,7 +31,7 @@ class FindBarViewTest : public CocoaTest {
public:
FindBarViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<FindBarView> view(
+ base::scoped_nsobject<FindBarView> view(
[[FindBarView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
@@ -43,7 +43,7 @@ class FindBarViewTest : public CocoaTest {
TEST_VIEW(FindBarViewTest, view_)
TEST_F(FindBarViewTest, FindBarEatsMouseClicksInBackgroundArea) {
- scoped_nsobject<MouseDownViewPong> pongView(
+ base::scoped_nsobject<MouseDownViewPong> pongView(
[[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]);
// Remove all of the subviews of the findbar, to make sure we don't
@@ -68,7 +68,7 @@ TEST_F(FindBarViewTest, FindBarEatsMouseClicksInBackgroundArea) {
}
TEST_F(FindBarViewTest, FindBarPassesThroughClicksInTransparentArea) {
- scoped_nsobject<MouseDownViewPong> pongView(
+ base::scoped_nsobject<MouseDownViewPong> pongView(
[[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]);
[view_ setFrame:NSMakeRect(0, 0, 200, 200)];
diff --git a/chrome/browser/ui/cocoa/find_pasteboard_unittest.mm b/chrome/browser/ui/cocoa/find_pasteboard_unittest.mm
index 049e152..374abc6 100644
--- a/chrome/browser/ui/cocoa/find_pasteboard_unittest.mm
+++ b/chrome/browser/ui/cocoa/find_pasteboard_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -68,7 +68,7 @@ class FindPasteboardTest : public CocoaTest {
pboard_.reset([[FindPasteboardTesting alloc] init]);
}
protected:
- scoped_nsobject<FindPasteboardTesting> pboard_;
+ base::scoped_nsobject<FindPasteboardTesting> pboard_;
};
TEST_F(FindPasteboardTest, SettingTextUpdatesPboard) {
diff --git a/chrome/browser/ui/cocoa/first_run_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/first_run_bubble_controller_unittest.mm
index 1d502f4..aee4d06 100644
--- a/chrome/browser/ui/cocoa/first_run_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/first_run_bubble_controller_unittest.mm
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "base/debug/debugger.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,11 +18,11 @@ class FirstRunBubbleControllerTest : public CocoaProfileTest {
// Check that the bubble doesn't crash or leak.
TEST_F(FirstRunBubbleControllerTest, Init) {
- scoped_nsobject<NSWindow> parent([[NSWindow alloc]
- initWithContentRect:NSMakeRect(0, 0, 800, 600)
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:NO]);
+ base::scoped_nsobject<NSWindow> parent(
+ [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
[parent setReleasedWhenClosed:NO];
if (base::debug::BeingDebugged())
[parent.get() orderFront:nil];
diff --git a/chrome/browser/ui/cocoa/first_run_dialog.mm b/chrome/browser/ui/cocoa/first_run_dialog.mm
index 658495e..29486ff 100644
--- a/chrome/browser/ui/cocoa/first_run_dialog.mm
+++ b/chrome/browser/ui/cocoa/first_run_dialog.mm
@@ -7,8 +7,8 @@
#include "base/bind.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#import "base/memory/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/first_run/first_run.h"
@@ -91,7 +91,7 @@ bool ShowFirstRun(Profile* profile) {
g_browser_process->local_state()->FindPreference(
prefs::kMetricsReportingEnabled);
if (!metrics_reporting_pref || !metrics_reporting_pref->IsManaged()) {
- scoped_nsobject<FirstRunDialogController> dialog(
+ base::scoped_nsobject<FirstRunDialogController> dialog(
[[FirstRunDialogController alloc] init]);
[dialog.get() showWindow:nil];
diff --git a/chrome/browser/ui/cocoa/floating_bar_backing_view_unittest.mm b/chrome/browser/ui/cocoa/floating_bar_backing_view_unittest.mm
index bf94628..f4a3a59 100644
--- a/chrome/browser/ui/cocoa/floating_bar_backing_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/floating_bar_backing_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/floating_bar_backing_view.h"
@@ -12,7 +12,7 @@ class FloatingBarBackingViewTest : public CocoaTest {
public:
FloatingBarBackingViewTest() {
NSRect content_frame = [[test_window() contentView] frame];
- scoped_nsobject<FloatingBarBackingView> view(
+ base::scoped_nsobject<FloatingBarBackingView> view(
[[FloatingBarBackingView alloc] initWithFrame:content_frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.h b/chrome/browser/ui/cocoa/framed_browser_window.h
index ee70280..024dc99 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.h
+++ b/chrome/browser/ui/cocoa/framed_browser_window.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/chrome_browser_window.h"
// Offsets from the top/left of the window frame to the top of the window
diff --git a/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm b/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
index 066576e..32322ee 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/debug/debugger.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
@@ -54,7 +54,7 @@ class FramedBrowserWindowTest : public CocoaTest {
bounds.origin.y += 40;
[frameView lockFocus];
- scoped_nsobject<NSBitmapImageRep> bitmap(
+ base::scoped_nsobject<NSBitmapImageRep> bitmap(
[[NSBitmapImageRep alloc] initWithFocusedViewRect:bounds]);
[frameView unlockFocus];
diff --git a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h
index b48fc87..60b986d 100644
--- a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h"
#include "googleurl/src/gurl.h"
@@ -34,10 +34,10 @@ class Browser;
// text views cannot conveniently be created in IB. The xib file contains
// a text field |exitLabelPlaceholder_| that's replaced by this text view
// |exitLabel_| in -awakeFromNib.
- scoped_nsobject<NSTextView> exitLabel_;
+ base::scoped_nsobject<NSTextView> exitLabel_;
- scoped_nsobject<NSTimer> hideTimer_;
- scoped_nsobject<NSAnimation> hideAnimation_;
+ base::scoped_nsobject<NSTimer> hideTimer_;
+ base::scoped_nsobject<NSAnimation> hideAnimation_;
};
// Initializes a new InfoBarController.
diff --git a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
index 520755e..c730c99 100644
--- a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
@@ -72,7 +72,7 @@ class FullscreenExitBubbleControllerTest : public CocoaProfileTest {
}
scoped_refptr<SiteInstance> site_instance_;
- scoped_nsobject<FullscreenExitBubbleController> controller_;
+ base::scoped_nsobject<FullscreenExitBubbleController> controller_;
};
// http://crbug.com/103912
diff --git a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm
index 6c491d6..8d79127 100644
--- a/chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
namespace {
@@ -43,7 +43,7 @@ const CGFloat kBubbleCornerRadius = 8.0;
[bezier closePath];
[[NSColor whiteColor] set];
gfx::ScopedNSGraphicsContextSaveGState scoped_g_state;
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
if (base::mac::IsOSLionOrLater()) {
[shadow setShadowBlurRadius:kShadowBlurRadiusLion];
} else {
diff --git a/chrome/browser/ui/cocoa/fullscreen_window_unittest.mm b/chrome/browser/ui/cocoa/fullscreen_window_unittest.mm
index 0ccf365..b80022b 100644
--- a/chrome/browser/ui/cocoa/fullscreen_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/fullscreen_window_unittest.mm
@@ -25,7 +25,7 @@ class FullscreenWindowTest : public CocoaTest {
};
TEST_F(FullscreenWindowTest, Basics) {
- scoped_nsobject<FullscreenWindow> window;
+ base::scoped_nsobject<FullscreenWindow> window;
window.reset([[FullscreenWindow alloc] init]);
EXPECT_EQ([NSScreen mainScreen], [window screen]);
@@ -37,10 +37,10 @@ TEST_F(FullscreenWindowTest, Basics) {
}
TEST_F(FullscreenWindowTest, CanPerformClose) {
- scoped_nsobject<FullscreenWindow> window;
+ base::scoped_nsobject<FullscreenWindow> window;
window.reset([[FullscreenWindow alloc] init]);
- scoped_nsobject<PerformCloseUIItem> item;
+ base::scoped_nsobject<PerformCloseUIItem> item;
item.reset([[PerformCloseUIItem alloc] init]);
EXPECT_TRUE([window validateUserInterfaceItem:item.get()]);
diff --git a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
index bb3377a..4ccb41a 100644
--- a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/global_error_bubble_controller.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -90,10 +90,10 @@ class Bridge : public GlobalErrorBubbleViewBase {
std::vector<string16> messages = error_->GetBubbleViewMessages();
string16 message = JoinString(messages, '\n');
- scoped_nsobject<NSMutableAttributedString> messageValue(
+ base::scoped_nsobject<NSMutableAttributedString> messageValue(
[[NSMutableAttributedString alloc]
- initWithString:SysUTF16ToNSString(message)]);
- scoped_nsobject<NSMutableParagraphStyle> style(
+ initWithString:SysUTF16ToNSString(message)]);
+ base::scoped_nsobject<NSMutableParagraphStyle> style(
[[NSMutableParagraphStyle alloc] init]);
[style setParagraphSpacing:kParagraphSpacing];
[messageValue addAttribute:NSParagraphStyleAttributeName
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.h b/chrome/browser/ui/cocoa/gradient_button_cell.h
index 515bc3a..7b03a28 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell.h
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace ui {
class ThemeProvider;
@@ -55,15 +55,15 @@ typedef enum {
// Custom drawing means we need to perform our own mouse tracking if
// the cell is setShowsBorderOnlyWhileMouseInside:YES.
BOOL isMouseInside_;
- scoped_nsobject<NSTrackingArea> trackingArea_;
+ base::scoped_nsobject<NSTrackingArea> trackingArea_;
BOOL shouldTheme_;
CGFloat hoverAlpha_; // 0-1. Controls the alpha during mouse hover
NSTimeInterval lastHoverUpdate_;
- scoped_nsobject<NSGradient> gradient_;
+ base::scoped_nsobject<NSGradient> gradient_;
gradient_button_cell::PulseState pulseState_;
CGFloat pulseMultiplier_; // for selecting pulse direction when continuous.
CGFloat outerStrokeAlphaMult_; // For pulsing.
- scoped_nsobject<NSImage> overlayImage_;
+ base::scoped_nsobject<NSImage> overlayImage_;
}
// Turn off theming. Temporary work-around.
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell.mm b/chrome/browser/ui/cocoa/gradient_button_cell.mm
index b5b0d51..959e0d3 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell.mm
+++ b/chrome/browser/ui/cocoa/gradient_button_cell.mm
@@ -7,12 +7,12 @@
#include <cmath>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/themes/theme_properties.h"
#import "chrome/browser/themes/theme_service.h"
#import "chrome/browser/ui/cocoa/nsview_additions.h"
-#import "chrome/browser/ui/cocoa/themed_window.h"
#import "chrome/browser/ui/cocoa/rect_path_utils.h"
+#import "chrome/browser/ui/cocoa/themed_window.h"
#include "grit/theme_resources.h"
#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
#import "ui/base/cocoa/nsgraphics_context_additions.h"
@@ -422,7 +422,7 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
// Draw the top inner highlight.
NSAffineTransform* highlightTransform = [NSAffineTransform transform];
[highlightTransform translateXBy:1 yBy:1];
- scoped_nsobject<NSBezierPath> highlightPath([innerPath copy]);
+ base::scoped_nsobject<NSBezierPath> highlightPath([innerPath copy]);
[highlightPath transformUsingAffineTransform:highlightTransform];
[[NSColor colorWithCalibratedWhite:1.0 alpha:0.2] setStroke];
[highlightPath stroke];
@@ -604,7 +604,7 @@ static const NSTimeInterval kAnimationContinuousCycleDuration = 0.4;
[NSColor blackColor];
if (isTemplate && themeProvider && themeProvider->UsingDefaultTheme()) {
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow.get() setShadowColor:themeProvider->GetNSColor(
ThemeProperties::COLOR_TOOLBAR_BEZEL, true)];
[shadow.get() setShadowOffset:NSMakeSize(0.0, -lineWidth)];
diff --git a/chrome/browser/ui/cocoa/gradient_button_cell_unittest.mm b/chrome/browser/ui/cocoa/gradient_button_cell_unittest.mm
index c174ae6..b9ea960 100644
--- a/chrome/browser/ui/cocoa/gradient_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/gradient_button_cell_unittest.mm
@@ -4,9 +4,9 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/gradient_button_cell.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/gradient_button_cell.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -20,10 +20,11 @@ class GradientButtonCellTest : public CocoaTest {
public:
GradientButtonCellTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton>view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSButton> view(
+ [[NSButton alloc] initWithFrame:frame]);
view_ = view.get();
- scoped_nsobject<GradientButtonCell> cell([[GradientButtonCell alloc]
- initTextCell:@"Testing"]);
+ base::scoped_nsobject<GradientButtonCell> cell(
+ [[GradientButtonCell alloc] initTextCell:@"Testing"]);
[view_ setCell:cell.get()];
[[test_window() contentView] addSubview:view_];
}
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.h b/chrome/browser/ui/cocoa/history_menu_bridge.h
index 8f4582e..2ab76ed1 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -9,8 +9,8 @@
#include <map>
#include <vector>
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_nsobject.h"
#include "chrome/browser/common/cancelable_request.h"
#import "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/history/history_service.h"
@@ -75,7 +75,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
// The URL that will be navigated to if the user selects this item.
GURL url;
// Favicon for the URL.
- scoped_nsobject<NSImage> icon;
+ base::scoped_nsobject<NSImage> icon;
// If the icon is being requested from the FaviconService, |icon_requested|
// will be true and |icon_task_id| will be valid. If this is false, then
@@ -89,7 +89,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
// quickly), the NSMenu can release the item before the HistoryItem has
// been fully deleted. If this were a weak pointer, it would result in a
// zombie.
- scoped_nsobject<NSMenuItem> menu_item;
+ base::scoped_nsobject<NSMenuItem> menu_item;
// This ID is unique for a browser session and can be passed to the
// TabRestoreService to re-open the closed window or tab that this
@@ -204,7 +204,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
friend class ::HistoryMenuBridgeTest;
friend class HistoryMenuCocoaControllerTest;
- scoped_nsobject<HistoryMenuCocoaController> controller_; // strong
+ base::scoped_nsobject<HistoryMenuCocoaController> controller_; // strong
Profile* profile_; // weak
HistoryService* history_service_; // weak
@@ -229,7 +229,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
bool need_recreate_;
// The default favicon if a HistoryItem does not have one.
- scoped_nsobject<NSImage> default_favicon_;
+ base::scoped_nsobject<NSImage> default_favicon_;
DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge);
};
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index dcf7b8b..0fc7438 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -207,12 +207,12 @@ void HistoryMenuBridge::TabRestoreServiceChanged(TabRestoreService* service) {
item->session_id = entry_win->id;
// Create the submenu.
- scoped_nsobject<NSMenu> submenu([[NSMenu alloc] init]);
+ base::scoped_nsobject<NSMenu> submenu([[NSMenu alloc] init]);
// Create standard items within the window submenu.
NSString* restore_title = l10n_util::GetNSString(
IDS_HISTORY_CLOSED_RESTORE_WINDOW_MAC);
- scoped_nsobject<NSMenuItem> restore_item(
+ base::scoped_nsobject<NSMenuItem> restore_item(
[[NSMenuItem alloc] initWithTitle:restore_title
action:@selector(openHistoryMenuItem:)
keyEquivalent:@""]);
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
index cccecdb..8ff1cf8 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
@@ -42,7 +42,7 @@ class MockBridge : public HistoryMenuBridge {
}
private:
- scoped_nsobject<NSMenu> menu_;
+ base::scoped_nsobject<NSMenu> menu_;
};
class HistoryMenuBridgeTest : public CocoaProfileTest {
diff --git a/chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm
index ddcfa9c..3870efb 100644
--- a/chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_menu_cocoa_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
@@ -71,7 +71,7 @@ class HistoryMenuCocoaControllerTest : public CocoaProfileTest {
};
TEST_F(HistoryMenuCocoaControllerTest, OpenURLForItem) {
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"History"]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"History"]);
CreateItems(menu.get());
std::map<NSMenuItem*, HistoryMenuBridge::HistoryItem*>& items =
diff --git a/chrome/browser/ui/cocoa/history_overlay_controller.h b/chrome/browser/ui/cocoa/history_overlay_controller.h
index 3a83a26..541b2f2 100644
--- a/chrome/browser/ui/cocoa/history_overlay_controller.h
+++ b/chrome/browser/ui/cocoa/history_overlay_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@class HistoryOverlayView;
@@ -23,9 +23,9 @@ enum HistoryOverlayMode {
@private
HistoryOverlayMode mode_;
// Strongly typed reference of self.view.
- scoped_nsobject<HistoryOverlayView> contentView_;
+ base::scoped_nsobject<HistoryOverlayView> contentView_;
// The view above which self.view is inserted as a subview.
- scoped_nsobject<NSView> parent_;
+ base::scoped_nsobject<NSView> parent_;
}
// Designated initializer.
diff --git a/chrome/browser/ui/cocoa/history_overlay_controller.mm b/chrome/browser/ui/cocoa/history_overlay_controller.mm
index f211afc..593a942 100644
--- a/chrome/browser/ui/cocoa/history_overlay_controller.mm
+++ b/chrome/browser/ui/cocoa/history_overlay_controller.mm
@@ -62,7 +62,7 @@ const CGFloat kGestureCompleteProgress = 0.3;
NSRect arrowRect = NSMakeRect(offset, 0, kShieldRadius, kShieldHeight);
arrowRect = NSInsetRect(arrowRect, 10, 0); // Give a little padding.
- scoped_nsobject<NSImageView> imageView(
+ base::scoped_nsobject<NSImageView> imageView(
[[NSImageView alloc] initWithFrame:arrowRect]);
[imageView setImage:image];
[imageView setAutoresizingMask:NSViewMinYMargin | NSViewMaxYMargin];
@@ -162,7 +162,7 @@ const CGFloat kGestureCompleteProgress = 0.3;
NSView* overlay = self.view;
- scoped_nsobject<CAAnimation> animation(
+ base::scoped_nsobject<CAAnimation> animation(
[[overlay animationForKey:@"alphaValue"] copy]);
[animation setDelegate:self];
[animation setDuration:kFadeOutDurationSeconds];
diff --git a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
index 491bf24..96ab915 100644
--- a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
@@ -28,7 +28,7 @@ class HistoryOverlayControllerTest : public CocoaTest {
}
private:
- scoped_nsobject<NSView> test_view_;
+ base::scoped_nsobject<NSView> test_view_;
};
// Tests that the controller's view gets removed from the hierarchy when the
@@ -37,7 +37,7 @@ TEST_F(HistoryOverlayControllerTest, RemovedViewWhenDeallocated) {
NSView* content_view = [test_window() contentView];
EXPECT_EQ(1u, [[content_view subviews] count]);
- scoped_nsobject<HistoryOverlayController> controller(
+ base::scoped_nsobject<HistoryOverlayController> controller(
[[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
[controller showPanelForView:test_view()];
EXPECT_EQ(2u, [[content_view subviews] count]);
@@ -49,7 +49,7 @@ TEST_F(HistoryOverlayControllerTest, RemovedViewWhenDeallocated) {
// Tests that when the controller is |-dismiss|ed, the animation runs and then
// is removed when the animation completes.
TEST_F(HistoryOverlayControllerTest, DismissClearsAnimations) {
- scoped_nsobject<HistoryOverlayController> controller(
+ base::scoped_nsobject<HistoryOverlayController> controller(
[[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
[controller showPanelForView:test_view()];
diff --git a/chrome/browser/ui/cocoa/hover_close_button.mm b/chrome/browser/ui/cocoa/hover_close_button.mm
index 793f345..a49a0f4 100644
--- a/chrome/browser/ui/cocoa/hover_close_button.mm
+++ b/chrome/browser/ui/cocoa/hover_close_button.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/hover_close_button.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/cocoa/hover_close_button_unittest.mm b/chrome/browser/ui/cocoa/hover_close_button_unittest.mm
index c978499..5d19c30 100644
--- a/chrome/browser/ui/cocoa/hover_close_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/hover_close_button_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/hover_close_button.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,7 +18,7 @@ class HoverCloseButtonTest : public CocoaTest {
}
protected:
- scoped_nsobject<HoverCloseButton> button_;
+ base::scoped_nsobject<HoverCloseButton> button_;
};
class WebUIHoverCloseButtonTest : public CocoaTest {
@@ -30,7 +30,7 @@ class WebUIHoverCloseButtonTest : public CocoaTest {
}
protected:
- scoped_nsobject<WebUIHoverCloseButton> button_;
+ base::scoped_nsobject<WebUIHoverCloseButton> button_;
};
TEST_VIEW(HoverCloseButtonTest, button_)
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.h b/chrome/browser/ui/cocoa/hung_renderer_controller.h
index 1d55c8d..1725726 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.h
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.h
@@ -19,7 +19,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "base/memory/scoped_ptr.h"
@class MultiKeyEquivalentButton;
@@ -46,11 +46,11 @@ class WebContents;
// Backing data for |tableView_|. Titles of each WebContents that
// shares a renderer process with |hungContents_|.
- scoped_nsobject<NSArray> hungTitles_;
+ base::scoped_nsobject<NSArray> hungTitles_;
// Favicons of each WebContents that shares a renderer process with
// |hungContents_|.
- scoped_nsobject<NSArray> hungFavicons_;
+ base::scoped_nsobject<NSArray> hungFavicons_;
}
// Kills the hung renderers.
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 0837b8b..b75da41 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -176,8 +176,8 @@ class WebContentsObserverBridge : public content::WebContentsObserver {
DCHECK(contents);
hungContents_ = contents;
hungContentsObserver_.reset(new WebContentsObserverBridge(contents, self));
- scoped_nsobject<NSMutableArray> titles([[NSMutableArray alloc] init]);
- scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
+ base::scoped_nsobject<NSMutableArray> titles([[NSMutableArray alloc] init]);
+ base::scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
for (TabContentsIterator it; !it.done(); it.Next()) {
if (it->GetRenderProcessHost() == hungContents_->GetRenderProcessHost()) {
string16 title = it->GetTitle();
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm b/chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm
index 4e71bd4..87bfdc4 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/hung_renderer_controller.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell.h b/chrome/browser/ui/cocoa/hyperlink_button_cell.h
index 2857275..1cdc263 100644
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell.h
+++ b/chrome/browser/ui/cocoa/hyperlink_button_cell.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// A HyperlinkButtonCell is used to create an NSButton that looks and acts
// like a hyperlink. The default styling is to look like blue, underlined text
@@ -16,7 +16,7 @@
// 4. In the Attributes panel, change the Bezel to Square.
// 5. In the Size panel, set the Height to 16.
@interface HyperlinkButtonCell : NSButtonCell {
- scoped_nsobject<NSColor> textColor_;
+ base::scoped_nsobject<NSColor> textColor_;
BOOL shouldUnderline_;
BOOL underlineOnHover_;
BOOL mouseIsInside_;
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell.mm b/chrome/browser/ui/cocoa/hyperlink_button_cell.mm
index 4047101..49f316c 100644
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell.mm
+++ b/chrome/browser/ui/cocoa/hyperlink_button_cell.mm
@@ -20,7 +20,7 @@
+ (NSButton*)buttonWithString:(NSString*)string {
NSButton* button = [[[NSButton alloc] initWithFrame:NSZeroRect] autorelease];
- scoped_nsobject<HyperlinkButtonCell> cell(
+ base::scoped_nsobject<HyperlinkButtonCell> cell(
[[HyperlinkButtonCell alloc] initTextCell:string]);
[cell setAlignment:NSLeftTextAlignment];
[button setCell:cell.get()];
@@ -83,8 +83,8 @@
(!underlineOnHover_ || (mouseIsInside_ && [self isEnabled])))
underlineMask = NSUnderlinePatternSolid | NSUnderlineStyleSingle;
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
- [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[paragraphStyle setAlignment:[self alignment]];
[paragraphStyle setLineBreakMode:[self lineBreakMode]];
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm b/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm
index fb59046..18abc03 100644
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm
@@ -5,9 +5,9 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -15,9 +15,10 @@ class HyperlinkButtonCellTest : public CocoaTest {
public:
HyperlinkButtonCellTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSButton> view(
+ [[NSButton alloc] initWithFrame:frame]);
view_ = view.get();
- scoped_nsobject<HyperlinkButtonCell> cell(
+ base::scoped_nsobject<HyperlinkButtonCell> cell(
[[HyperlinkButtonCell alloc] initTextCell:@"Testing"]);
cell_ = cell.get();
[view_ setCell:cell_];
@@ -47,7 +48,8 @@ TEST_VIEW(HyperlinkButtonCellTest, view_)
// Tests the three designated intializers.
TEST_F(HyperlinkButtonCellTest, Initializers) {
TestCellCustomization(cell_); // |-initTextFrame:|
- scoped_nsobject<HyperlinkButtonCell> cell([[HyperlinkButtonCell alloc] init]);
+ base::scoped_nsobject<HyperlinkButtonCell> cell(
+ [[HyperlinkButtonCell alloc] init]);
TestCellCustomization(cell.get());
// Need to create a dummy archiver to test |-initWithCoder:|.
diff --git a/chrome/browser/ui/cocoa/hyperlink_text_view.mm b/chrome/browser/ui/cocoa/hyperlink_text_view.mm
index ea92f4c..8b05732 100644
--- a/chrome/browser/ui/cocoa/hyperlink_text_view.mm
+++ b/chrome/browser/ui/cocoa/hyperlink_text_view.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
// The baseline shift for text in the NSTextView.
const float kTextBaselineShift = -1.0;
@@ -96,7 +96,7 @@ const float kTextBaselineShift = -1.0;
forKey:NSBaselineOffsetAttributeName];
// Create the attributed string for the message.
- scoped_nsobject<NSMutableAttributedString> attributedMessage(
+ base::scoped_nsobject<NSMutableAttributedString> attributedMessage(
[[NSMutableAttributedString alloc] initWithString:message
attributes:attributes]);
@@ -115,9 +115,8 @@ const float kTextBaselineShift = -1.0;
forKey:NSLinkAttributeName];
// Insert the link into the message at the appropriate offset.
- scoped_nsobject<NSAttributedString> attributedLink(
- [[NSAttributedString alloc] initWithString:link
- attributes:attributes]);
+ base::scoped_nsobject<NSAttributedString> attributedLink(
+ [[NSAttributedString alloc] initWithString:link attributes:attributes]);
[attributedMessage.get() insertAttributedString:attributedLink.get()
atIndex:linkOffset];
// Ensure the TextView doesn't override the link style.
diff --git a/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm b/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm
index b5903b2..2faf956 100644
--- a/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
@@ -12,7 +12,7 @@ class HyperlinkTextViewTest : public CocoaTest {
public:
HyperlinkTextViewTest() {
NSRect frame = NSMakeRect(0, 0, 50, 50);
- scoped_nsobject<HyperlinkTextView> view(
+ base::scoped_nsobject<HyperlinkTextView> view(
[[HyperlinkTextView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/image_button_cell.h b/chrome/browser/ui/cocoa/image_button_cell.h
index 7f90195..4f4dc60 100644
--- a/chrome/browser/ui/cocoa/image_button_cell.h
+++ b/chrome/browser/ui/cocoa/image_button_cell.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace image_button_cell {
@@ -39,7 +39,7 @@ enum ButtonState {
struct {
// At most one of these two fields will be non-null.
int imageId;
- scoped_nsobject<NSImage> image;
+ base::scoped_nsobject<NSImage> image;
} image_[image_button_cell::kButtonStateCount];
BOOL isMouseInside_;
}
diff --git a/chrome/browser/ui/cocoa/image_button_cell_unittest.mm b/chrome/browser/ui/cocoa/image_button_cell_unittest.mm
index bbe2921..84d1191 100644
--- a/chrome/browser/ui/cocoa/image_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/image_button_cell_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
#include "grit/theme_resources.h"
@@ -13,9 +13,10 @@ class ImageButtonCellTest : public CocoaTest {
public:
ImageButtonCellTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton>view([[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSButton> view(
+ [[NSButton alloc] initWithFrame:frame]);
view_ = view.get();
- scoped_nsobject<ImageButtonCell> cell(
+ base::scoped_nsobject<ImageButtonCell> cell(
[[ImageButtonCell alloc] initTextCell:@""]);
[view_ setCell:cell.get()];
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm b/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
index c3db086..e884072 100644
--- a/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/importer/import_lock_dialog_cocoa.mm
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/callback.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "chrome/browser/importer/importer_lock_dialog.h"
#include "content/public/browser/user_metrics.h"
@@ -20,7 +20,7 @@ namespace importer {
void ShowImportLockDialog(gfx::NativeWindow parent,
const base::Callback<void(bool)>& callback) {
- scoped_nsobject<NSAlert> lock_alert([[NSAlert alloc] init]);
+ base::scoped_nsobject<NSAlert> lock_alert([[NSAlert alloc] init]);
[lock_alert addButtonWithTitle:l10n_util::GetNSStringWithFixup(
IDS_IMPORTER_LOCK_OK)];
[lock_alert addButtonWithTitle:l10n_util::GetNSStringWithFixup(
diff --git a/chrome/browser/ui/cocoa/info_bubble_view.h b/chrome/browser/ui/cocoa/info_bubble_view.h
index b7c9a76..6987eb7 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view.h
+++ b/chrome/browser/ui/cocoa/info_bubble_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace info_bubble {
@@ -50,7 +50,7 @@ enum BubbleAlignment {
info_bubble::BubbleArrowLocation arrowLocation_;
info_bubble::BubbleAlignment alignment_;
info_bubble::CornerFlags cornerFlags_;
- scoped_nsobject<NSColor> backgroundColor_;
+ base::scoped_nsobject<NSColor> backgroundColor_;
}
@property(assign, nonatomic) info_bubble::BubbleArrowLocation arrowLocation;
diff --git a/chrome/browser/ui/cocoa/info_bubble_view.mm b/chrome/browser/ui/cocoa/info_bubble_view.mm
index e5be040..33a749e 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_view.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
@implementation InfoBubbleView
diff --git a/chrome/browser/ui/cocoa/info_bubble_view_unittest.mm b/chrome/browser/ui/cocoa/info_bubble_view_unittest.mm
index ff60da5..82b135a 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_view_unittest.mm
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/info_bubble_view.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/info_bubble_view.h"
namespace {
@@ -12,7 +12,7 @@ class InfoBubbleViewTest : public CocoaTest {
public:
InfoBubbleViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<InfoBubbleView> view(
+ base::scoped_nsobject<InfoBubbleView> view(
[[InfoBubbleView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/info_bubble_window.mm b/chrome/browser/ui/cocoa/info_bubble_window.mm
index 4da277a..1cc17b8 100644
--- a/chrome/browser/ui/cocoa/info_bubble_window.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_window.mm
@@ -6,7 +6,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -123,7 +123,7 @@ class AppNotificationBridge : public content::NotificationObserver {
// Notice that only the alphaValue Animation is replaced in case
// superclasses set up animations.
CAAnimation* alphaAnimation = [CABasicAnimation animation];
- scoped_nsobject<InfoBubbleWindowCloser> delegate(
+ base::scoped_nsobject<InfoBubbleWindowCloser> delegate(
[[InfoBubbleWindowCloser alloc] initWithWindow:self]);
[alphaAnimation setDelegate:delegate];
NSMutableDictionary* animations =
diff --git a/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h b/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h
index b2e10a0..df751e2 100644
--- a/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h
@@ -5,8 +5,8 @@
#import "chrome/browser/ui/cocoa/infobars/translate_infobar_base.h"
@interface BeforeTranslateInfobarController : TranslateInfoBarControllerBase {
- scoped_nsobject<NSButton> alwaysTranslateButton_;
- scoped_nsobject<NSButton> neverTranslateButton_;
+ base::scoped_nsobject<NSButton> alwaysTranslateButton_;
+ base::scoped_nsobject<NSButton> neverTranslateButton_;
}
// Creates and initializes the alwaysTranslate and neverTranslate buttons.
diff --git a/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm b/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm
index af29dee..2ef1404 100644
--- a/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
@@ -110,8 +110,8 @@ class ConfirmInfoBarControllerTest : public CocoaProfileTest,
bool delegate_closed() const { return delegate_ == NULL; }
MockConfirmInfoBarDelegate* delegate_; // Owns itself.
- scoped_nsobject<id> container_;
- scoped_nsobject<ConfirmInfoBarController> controller_;
+ base::scoped_nsobject<id> container_;
+ base::scoped_nsobject<ConfirmInfoBarController> controller_;
bool closed_delegate_ok_clicked_;
bool closed_delegate_cancel_clicked_;
bool closed_delegate_link_clicked_;
diff --git a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h
index b028658..809aa31e 100644
--- a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.h
@@ -9,7 +9,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
@class ExtensionActionContextMenu;
@@ -25,10 +25,10 @@ class InfobarBridge;
// The InfoBar's button with the Extension's icon that launches the context
// menu.
- scoped_nsobject<MenuButton> dropdownButton_;
+ base::scoped_nsobject<MenuButton> dropdownButton_;
// The context menu that pops up when the left button is clicked.
- scoped_nsobject<ExtensionActionContextMenu> contextMenu_;
+ base::scoped_nsobject<ExtensionActionContextMenu> contextMenu_;
// Helper class to bridge C++ and ObjC functionality together for the infobar.
scoped_ptr<InfobarBridge> bridge_;
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
index c08ea19..f645b79 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
#include "content/public/browser/notification_registrar.h"
@@ -58,10 +58,10 @@ const CGFloat kTipHeight = 12.0;
content::WebContents* currentWebContents_; // weak
// Holds the InfoBarControllers currently owned by this container.
- scoped_nsobject<NSMutableArray> infobarControllers_;
+ base::scoped_nsobject<NSMutableArray> infobarControllers_;
// Holds InfoBarControllers when they are in the process of animating out.
- scoped_nsobject<NSMutableSet> closingInfoBars_;
+ base::scoped_nsobject<NSMutableSet> closingInfoBars_;
// Lets us registers for INFOBAR_ADDED/INFOBAR_REMOVED
// notifications. The actual notifications are sent to the
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm b/chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm
index 5251de5..88d3152 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
#include "chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h"
@@ -32,7 +32,7 @@ class InfoBarContainerControllerTest : public CocoaTest {
}
public:
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
InfoBarContainerController* controller_;
};
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_controller.h b/chrome/browser/ui/cocoa/infobars/infobar_controller.h
index 2f8f26b..f96e7b1 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_controller.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_controller.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@class AnimatableView;
@protocol InfoBarContainer;
@@ -39,7 +39,7 @@ class InfoBarService;
// text views cannot conveniently be created in IB. The xib file contains
// a text field |labelPlaceholder_| that's replaced by this text view |label_|
// in -awakeFromNib.
- scoped_nsobject<NSTextView> label_;
+ base::scoped_nsobject<NSTextView> label_;
};
// Initializes a new InfoBarController.
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
index 352d7ce..51fdb17 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/infobars/infobar.h"
#import "chrome/browser/themes/theme_properties.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
@@ -42,7 +42,7 @@ const CGFloat kTipWidth = 23;
- (void)setInfobarType:(InfoBarDelegate::Type)infobarType {
SkColor topColor = GetInfoBarTopColor(infobarType);
SkColor bottomColor = GetInfoBarBottomColor(infobarType);
- scoped_nsobject<NSGradient> gradient([[NSGradient alloc]
+ base::scoped_nsobject<NSGradient> gradient([[NSGradient alloc]
initWithStartingColor:gfx::SkColorToCalibratedNSColor(topColor)
endingColor:gfx::SkColorToCalibratedNSColor(bottomColor)]);
[self setGradient:gradient];
@@ -84,7 +84,7 @@ const CGFloat kTipWidth = 23;
[infoBarPath lineToPoint:NSMakePoint(NSMaxX(bounds), NSMaxY(bounds))];
// Save off the top path of the infobar.
- scoped_nsobject<NSBezierPath> topPath([infoBarPath copy]);
+ base::scoped_nsobject<NSBezierPath> topPath([infoBarPath copy]);
[infoBarPath lineToPoint:NSMakePoint(NSMaxX(bounds), NSMinY(bounds))];
[infoBarPath lineToPoint:NSMakePoint(NSMinX(bounds), NSMinY(bounds))];
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm
index da5b02b..5ef8e83 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h"
namespace {
@@ -12,7 +12,7 @@ class InfoBarGradientViewTest : public CocoaTest {
public:
InfoBarGradientViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<InfoBarGradientView> view(
+ base::scoped_nsobject<InfoBarGradientView> view(
[[InfoBarGradientView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_utilities.mm b/chrome/browser/ui/cocoa/infobars/infobar_utilities.mm
index 13a09ff..c5e5e63 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_utilities.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_utilities.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h"
@@ -69,10 +69,10 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
if (tag == -1) {
[menu addItem:[NSMenuItem separatorItem]];
} else {
- scoped_nsobject<NSMenuItem> item([[NSMenuItem alloc]
- initWithTitle:title
- action:selector
- keyEquivalent:@""]);
+ base::scoped_nsobject<NSMenuItem> item(
+ [[NSMenuItem alloc] initWithTitle:title
+ action:selector
+ keyEquivalent:@""]);
[item setTag:tag];
[menu addItem:item];
[item setTarget:target];
diff --git a/chrome/browser/ui/cocoa/infobars/translate_infobar_base.h b/chrome/browser/ui/cocoa/infobars/translate_infobar_base.h
index 31df784..d1d96ae6 100644
--- a/chrome/browser/ui/cocoa/infobars/translate_infobar_base.h
+++ b/chrome/browser/ui/cocoa/infobars/translate_infobar_base.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/translate/options_menu_model.h"
#include "chrome/browser/translate/translate_infobar_delegate.h"
@@ -23,17 +23,17 @@
// - (bool)verifyLayout; // For testing.
@interface TranslateInfoBarControllerBase : InfoBarController<NSMenuDelegate> {
@protected
- scoped_nsobject<NSTextField> label1_;
- scoped_nsobject<NSTextField> label2_;
- scoped_nsobject<NSTextField> label3_;
- scoped_nsobject<NSPopUpButton> fromLanguagePopUp_;
- scoped_nsobject<NSPopUpButton> toLanguagePopUp_;
- scoped_nsobject<NSPopUpButton> optionsPopUp_;
- scoped_nsobject<NSButton> showOriginalButton_;
+ base::scoped_nsobject<NSTextField> label1_;
+ base::scoped_nsobject<NSTextField> label2_;
+ base::scoped_nsobject<NSTextField> label3_;
+ base::scoped_nsobject<NSPopUpButton> fromLanguagePopUp_;
+ base::scoped_nsobject<NSPopUpButton> toLanguagePopUp_;
+ base::scoped_nsobject<NSPopUpButton> optionsPopUp_;
+ base::scoped_nsobject<NSButton> showOriginalButton_;
// This is the button used in the translate message infobar. It can either be
// a "Try Again" button, or a "Show Original" button in the case that the
// page was translated from an unknown language.
- scoped_nsobject<NSButton> translateMessageButton_;
+ base::scoped_nsobject<NSButton> translateMessageButton_;
// In the current locale, are the "from" and "to" language popup menu
// flipped from what they'd appear in English.
diff --git a/chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm b/chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm
index 70daca6..e5ae2a0 100644
--- a/chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm
+++ b/chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/app/chrome_command_ids.h" // For translate menu command ids.
@@ -107,7 +107,7 @@ class TranslationInfoBarTest : public CocoaProfileTest {
scoped_ptr<WebContents> web_contents_;
scoped_ptr<MockTranslateInfoBarDelegate> infobar_delegate_;
- scoped_nsobject<TranslateInfoBarControllerBase> infobar_controller_;
+ base::scoped_nsobject<TranslateInfoBarControllerBase> infobar_controller_;
};
// Check that we can instantiate a Translate Infobar correctly.
diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h
index 7aa97ff..aa7153c 100644
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h
+++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h
@@ -8,7 +8,7 @@
#include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#if __OBJC__
@@ -37,7 +37,7 @@ class JavaScriptAppModalDialogCocoa : public NativeAppModalDialog {
private:
scoped_ptr<JavaScriptAppModalDialog> dialog_;
- scoped_nsobject<JavaScriptAppModalDialogHelper> helper_;
+ base::scoped_nsobject<JavaScriptAppModalDialogHelper> helper_;
NSAlert* alert_; // weak, owned by |helper_|.
DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialogCocoa);
diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
index 5e8b6e3..a903723 100644
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
@@ -21,7 +21,7 @@
// going away. Is responsible for cleaning itself up.
@interface JavaScriptAppModalDialogHelper : NSObject<NSAlertDelegate> {
@private
- scoped_nsobject<NSAlert> alert_;
+ base::scoped_nsobject<NSAlert> alert_;
NSTextField* textField_; // WEAK; owned by alert_
}
@@ -208,13 +208,13 @@ JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa(
}
if (message_has_rtl && message_text_field) {
- scoped_nsobject<NSMutableParagraphStyle> alignment(
+ base::scoped_nsobject<NSMutableParagraphStyle> alignment(
[[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[alignment setAlignment:NSRightTextAlignment];
NSDictionary* alignment_attributes =
@{ NSParagraphStyleAttributeName : alignment };
- scoped_nsobject<NSAttributedString> attr_string(
+ base::scoped_nsobject<NSAttributedString> attr_string(
[[NSAttributedString alloc] initWithString:message_text
attributes:alignment_attributes]);
@@ -225,7 +225,7 @@ JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa(
if (informative_has_rtl && informative_text_field) {
base::i18n::TextDirection direction =
base::i18n::GetFirstStrongCharacterDirection(dialog_->message_text());
- scoped_nsobject<NSMutableParagraphStyle> alignment(
+ base::scoped_nsobject<NSMutableParagraphStyle> alignment(
[[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[alignment setAlignment:
(direction == base::i18n::RIGHT_TO_LEFT) ? NSRightTextAlignment
@@ -233,7 +233,7 @@ JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa(
NSDictionary* alignment_attributes =
@{ NSParagraphStyleAttributeName : alignment };
- scoped_nsobject<NSAttributedString> attr_string(
+ base::scoped_nsobject<NSAttributedString> attr_string(
[[NSAttributedString alloc] initWithString:informative_text
attributes:alignment_attributes]);
diff --git a/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h b/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h
index c24c8de..f0a38ac 100644
--- a/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#import "ui/base/cocoa/tracking_area.h"
@@ -25,7 +25,7 @@ class Profile;
scoped_ptr<ActionBoxMenuModel> model_;
// Array of the below view controllers.
- scoped_nsobject<NSMutableArray> items_;
+ base::scoped_nsobject<NSMutableArray> items_;
}
// Designated initializer. |point| must be in screen coordinates.
diff --git a/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.mm
index 5c0862e..d65dc50 100644
--- a/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/location_bar/action_box_menu_bubble_controller.mm
@@ -100,7 +100,7 @@ class ExtensionIconLoaderBridge : public extensions::IconImage::Observer {
// Use an arbitrary height because it will reflect the size of the content.
NSRect contentRect = NSMakeRect(0, 0, kBubbleMinWidth, 150);
// Create an empty window into which content is placed.
- scoped_nsobject<InfoBubbleWindow> window(
+ base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -160,7 +160,7 @@ class ExtensionIconLoaderBridge : public extensions::IconImage::Observer {
CGFloat yOffset = kVerticalPadding;
// Keep track of a potential separator to resize it when we know the width.
- scoped_nsobject<NSBox> separatorView;
+ base::scoped_nsobject<NSBox> separatorView;
// Loop over the items in reverse, constructing the menu items.
CGFloat width = kBubbleMinWidth;
@@ -183,11 +183,10 @@ class ExtensionIconLoaderBridge : public extensions::IconImage::Observer {
} else {
// Create the item controller. Autorelease it because it will be owned
// by the |items_| array.
- scoped_nsobject<ActionBoxMenuItemController> itemController(
- [[ActionBoxMenuItemController alloc]
- initWithModelIndex:i
- menuController:self
- profile:profile_]);
+ base::scoped_nsobject<ActionBoxMenuItemController> itemController(
+ [[ActionBoxMenuItemController alloc] initWithModelIndex:i
+ menuController:self
+ profile:profile_]);
// Adjust the name field to fit the string.
[GTMUILocalizerAndLayoutTweaker sizeToFitView:[itemController nameField]];
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h
index a54e788..eadb217 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/styled_text_field.h"
#import "chrome/browser/ui/cocoa/url_drop_target.h"
@@ -113,18 +113,18 @@ class AutocompleteTextFieldObserver {
@private
// Undo manager for this text field. We use a specific instance rather than
// the standard undo manager in order to let us clear the undo stack at will.
- scoped_nsobject<NSUndoManager> undoManager_;
+ base::scoped_nsobject<NSUndoManager> undoManager_;
AutocompleteTextFieldObserver* observer_; // weak, owned by location bar.
// Handles being a drag-and-drop target.
- scoped_nsobject<URLDropTargetHandler> dropHandler_;
+ base::scoped_nsobject<URLDropTargetHandler> dropHandler_;
// Holds current tooltip strings, to keep them from being dealloced.
- scoped_nsobject<NSMutableArray> currentToolTips_;
+ base::scoped_nsobject<NSMutableArray> currentToolTips_;
- scoped_nsobject<NSString> suggestText_;
- scoped_nsobject<NSColor> suggestColor_;
+ base::scoped_nsobject<NSString> suggestText_;
+ base::scoped_nsobject<NSColor> suggestColor_;
}
@property(nonatomic) AutocompleteTextFieldObserver* observer;
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
index fcdd149..addda9c 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
@@ -449,13 +449,13 @@ void DrawInstantSuggestion(NSAttributedString* mainText,
if (![suggestText length])
return;
- scoped_nsobject<NSTextFieldCell> cell(
+ base::scoped_nsobject<NSTextFieldCell> cell(
[[NSTextFieldCell alloc] initTextCell:@""]);
[cell setBordered:NO];
[cell setDrawsBackground:NO];
[cell setEditable:NO];
- scoped_nsobject<NSMutableAttributedString> combinedText(
+ base::scoped_nsobject<NSMutableAttributedString> combinedText(
[[NSMutableAttributedString alloc] initWithAttributedString:mainText]);
NSRange range = NSMakeRange([combinedText length], 0);
[combinedText replaceCharactersInRange:range withString:suggestText];
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index 32d9cdb..d91b249 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -547,7 +547,7 @@ size_t CalculatePositionsInFrame(
}
NSDictionary* info = [self getDictionaryForButtonDecoration:button];
- scoped_nsobject<CrTrackingArea> area(
+ base::scoped_nsobject<CrTrackingArea> area(
[[CrTrackingArea alloc] initWithRect:decorationFrames[i]
options:NSTrackingMouseEnteredAndExited |
NSTrackingActiveAlways
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
index 3af9e75..def7ede 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
@@ -19,8 +19,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "third_party/ocmock/gtest_support.h"
#include "ui/base/resource/resource_bundle.h"
using ::testing::Return;
@@ -51,11 +51,11 @@ class AutocompleteTextFieldCellTest : public CocoaTest {
// decorations.
const NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<NSTextField> view(
+ base::scoped_nsobject<NSTextField> view(
[[NSTextField alloc] initWithFrame:frame]);
view_ = view.get();
- scoped_nsobject<AutocompleteTextFieldCell> cell(
+ base::scoped_nsobject<AutocompleteTextFieldCell> cell(
[[AutocompleteTextFieldCell alloc] initTextCell:@"Testing"]);
[cell setEditable:YES];
[cell setBordered:YES];
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
index 1943ae8..cf2c5b3 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/url_drop_target.h"
@class AutocompleteTextField;
@@ -23,9 +23,9 @@ class AutocompleteTextFieldObserver;
// allowing the |AutocompletTextField| to handle it (by making an empty
// |-updateDragTypeRegistration|), since the latter results in a weird
// start-up time regression.
- scoped_nsobject<URLDropTargetHandler> dropHandler_;
+ base::scoped_nsobject<URLDropTargetHandler> dropHandler_;
- scoped_nsobject<NSCharacterSet> forbiddenCharacters_;
+ base::scoped_nsobject<NSCharacterSet> forbiddenCharacters_;
// Indicates if the field editor's interpretKeyEvents: method is being called.
// If it's YES, then we should postpone the call to the observer's
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
index 548f6e2..dac079a 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "chrome/app/chrome_command_ids.h" // IDC_*
@@ -15,8 +15,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
-#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/ocmock_extensions.h"
#import "ui/base/test/cocoa_test_event_utils.h"
@@ -35,7 +35,7 @@ class AutocompleteTextFieldEditorTest : public CocoaTest {
virtual void SetUp() {
CocoaTest::SetUp();
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<AutocompleteTextField> field(
+ base::scoped_nsobject<AutocompleteTextField> field(
[[AutocompleteTextField alloc] initWithFrame:frame]);
field_ = field.get();
[field_ setStringValue:@"Testing"];
@@ -56,7 +56,8 @@ class AutocompleteTextFieldEditorTest : public CocoaTest {
AutocompleteTextFieldEditor* editor_;
AutocompleteTextField* field_;
- scoped_nsobject<AutocompleteTextFieldWindowTestDelegate> window_delegate_;
+ base::scoped_nsobject<AutocompleteTextFieldWindowTestDelegate>
+ window_delegate_;
};
// Disabled because it crashes sometimes. http://crbug.com/49522
@@ -107,7 +108,7 @@ TEST_F(AutocompleteTextFieldEditorTest, PageActionMenus) {
// Trivial menu which we can recognize and which doesn't look like
// the default editor context menu.
- scoped_nsobject<id> menu([[NSMenu alloc] initWithTitle:@"Menu"]);
+ base::scoped_nsobject<id> menu([[NSMenu alloc] initWithTitle:@"Menu"]);
[menu addItemWithTitle:@"Go Fish"
action:@selector(goFish:)
keyEquivalent:@""];
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
index 63a4d85..72ffc7a 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
@@ -5,13 +5,13 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "grit/theme_resources.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -75,7 +75,7 @@ class AutocompleteTextFieldTest : public CocoaTest {
// Make sure this is wide enough to play games with the cell
// decorations.
NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<AutocompleteTextField> field(
+ base::scoped_nsobject<AutocompleteTextField> field(
[[AutocompleteTextField alloc] initWithFrame:frame]);
field_ = field.get();
[field_ setStringValue:@"Test test"];
@@ -129,7 +129,8 @@ class AutocompleteTextFieldTest : public CocoaTest {
AutocompleteTextField* field_;
MockDecoration mock_left_decoration_;
MockDecoration mock_right_decoration_;
- scoped_nsobject<AutocompleteTextFieldWindowTestDelegate> window_delegate_;
+ base::scoped_nsobject<AutocompleteTextFieldWindowTestDelegate>
+ window_delegate_;
};
TEST_VIEW(AutocompleteTextFieldTest, field_);
@@ -622,9 +623,9 @@ TEST_F(AutocompleteTextFieldTest, DecorationMenu) {
const CGFloat edge = NSHeight(bounds) - 4.0;
const NSSize size = NSMakeSize(edge, edge);
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:size]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:size]);
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"Menu"]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"Menu"]);
mock_left_decoration_.SetVisible(true);
mock_right_decoration_.SetVisible(true);
@@ -674,7 +675,7 @@ TEST_F(AutocompleteTextFieldTest, SetAttributedStringBaseline) {
[NSDictionary dictionaryWithObject:font
forKey:NSFontAttributeName];
NSString* const kString = @"This is a test";
- scoped_nsobject<NSAttributedString> attributedString(
+ base::scoped_nsobject<NSAttributedString> attributedString(
[[NSAttributedString alloc] initWithString:kString
attributes:attributes]);
@@ -707,7 +708,7 @@ TEST_F(AutocompleteTextFieldTest, SetAttributedStringUndo) {
[NSDictionary dictionaryWithObject:redColor
forKey:NSForegroundColorAttributeName];
NSString* const kString = @"This is a test";
- scoped_nsobject<NSAttributedString> attributedString(
+ base::scoped_nsobject<NSAttributedString> attributedString(
[[NSAttributedString alloc] initWithString:kString
attributes:attributes]);
[test_window() makePretendKeyWindowAndSetFirstResponder:field_];
@@ -816,7 +817,7 @@ TEST_F(AutocompleteTextFieldObserverTest, ClosePopupOnResignKey) {
EXPECT_CALL(field_observer_, ClosePopup());
[test_window() resignKeyWindow];
- scoped_nsobject<AutocompleteTextField> pin([field_ retain]);
+ base::scoped_nsobject<AutocompleteTextField> pin([field_ retain]);
[field_ removeFromSuperview];
[test_window() resignKeyWindow];
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h
index cd8116a..3ba6511 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest_helper.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -17,7 +17,7 @@
@interface AutocompleteTextFieldWindowTestDelegate :
NSObject<NSWindowDelegate> {
- scoped_nsobject<AutocompleteTextFieldEditor> editor_;
+ base::scoped_nsobject<AutocompleteTextFieldEditor> editor_;
}
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject;
@end
diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.h b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.h
index a1e55f5..6a1d1cc 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
// Draws an outlined rounded rect, with an optional image to the left
@@ -46,18 +46,18 @@ class BubbleDecoration : public LocationBarDecoration {
UsesPartialKeywordIfNarrow);
// Image drawn in the left side of the bubble.
- scoped_nsobject<NSImage> image_;
+ base::scoped_nsobject<NSImage> image_;
// Label to draw to right of image. Can be |nil|.
- scoped_nsobject<NSString> label_;
+ base::scoped_nsobject<NSString> label_;
// Contains attribute for drawing |label_|.
- scoped_nsobject<NSMutableDictionary> attributes_;
+ base::scoped_nsobject<NSMutableDictionary> attributes_;
// Colors used to draw the bubble, should be set by the subclass
// constructor.
- scoped_nsobject<NSColor> background_color_;
- scoped_nsobject<NSColor> border_color_;
+ base::scoped_nsobject<NSColor> background_color_;
+ base::scoped_nsobject<NSColor> border_color_;
DISALLOW_COPY_AND_ASSIGN(BubbleDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/button_decoration.h b/chrome/browser/ui/cocoa/location_bar/button_decoration.h
index 70d4708..fde8f94 100644
--- a/chrome/browser/ui/cocoa/location_bar/button_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/button_decoration.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUTTON_DECORATION_H_
#define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUTTON_DECORATION_H_
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
// |LocationBarDecoration| which looks and acts like a button.
@@ -42,9 +42,9 @@ class ButtonDecoration : public LocationBarDecoration {
void SetPressedImage(NSImage* pressed_image);
private:
- scoped_nsobject<NSImage> normal_image_;
- scoped_nsobject<NSImage> hover_image_;
- scoped_nsobject<NSImage> pressed_image_;
+ base::scoped_nsobject<NSImage> normal_image_;
+ base::scoped_nsobject<NSImage> hover_image_;
+ base::scoped_nsobject<NSImage> pressed_image_;
ButtonState state_;
NSImage* GetImage();
diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h
index 219992e..dafcd11 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h
@@ -52,7 +52,7 @@ class ContentSettingDecoration : public ImageDecoration {
void SetToolTip(NSString* tooltip);
// Returns an attributed string with the animated text.
- scoped_nsobject<NSAttributedString> CreateAnimatedText();
+ base::scoped_nsobject<NSAttributedString> CreateAnimatedText();
// Measure the width of the animated text.
CGFloat MeasureTextWidth();
@@ -62,13 +62,13 @@ class ContentSettingDecoration : public ImageDecoration {
LocationBarViewMac* owner_; // weak
Profile* profile_; // weak
- scoped_nsobject<NSString> tooltip_;
+ base::scoped_nsobject<NSString> tooltip_;
// Used when the decoration has animated text.
- scoped_nsobject<ContentSettingAnimationState> animation_;
+ base::scoped_nsobject<ContentSettingAnimationState> animation_;
CGFloat text_width_;
- scoped_nsobject<NSAttributedString> animated_text_;
- scoped_nsobject<NSGradient> gradient_;
+ base::scoped_nsobject<NSAttributedString> animated_text_;
+ base::scoped_nsobject<NSGradient> gradient_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
index 79c33f1..174f5bf 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
@@ -228,19 +228,19 @@ CGFloat ContentSettingDecoration::MeasureTextWidth() {
return [animated_text_ size].width;
}
-scoped_nsobject<NSAttributedString>
+base::scoped_nsobject<NSAttributedString>
ContentSettingDecoration::CreateAnimatedText() {
NSString* text =
l10n_util::GetNSString(
content_setting_image_model_->explanatory_string_id());
- scoped_nsobject<NSMutableParagraphStyle> style(
+ base::scoped_nsobject<NSMutableParagraphStyle> style(
[[NSMutableParagraphStyle alloc] init]);
// Set line break mode to clip the text, otherwise drawInRect: won't draw a
// word if it doesn't fit in the bounding box.
[style setLineBreakMode:NSLineBreakByClipping];
NSDictionary* attributes = @{ NSFontAttributeName : GetFont(),
NSParagraphStyleAttributeName : style };
- return scoped_nsobject<NSAttributedString>(
+ return base::scoped_nsobject<NSAttributedString>(
[[NSAttributedString alloc] initWithString:text attributes:attributes]);
}
diff --git a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h
index ee7d99f..b17e7d8 100644
--- a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h
@@ -44,7 +44,7 @@ class EVBubbleDecoration : public BubbleDecoration {
private:
// The real label. BubbleDecoration's label may be elided.
- scoped_nsobject<NSString> full_label_;
+ base::scoped_nsobject<NSString> full_label_;
LocationIconDecoration* location_icon_; // weak, owned by location bar.
diff --git a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration_unittest.mm
index f07cfb2..e898e20 100644
--- a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration_unittest.mm
@@ -28,7 +28,8 @@ TEST_F(EVBubbleDecorationTest, MiddleElide) {
const CGFloat kMinimumWidth = 100.0; // Never should get this small.
const NSSize kImageSize = NSMakeSize(20.0, 20.0);
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:kImageSize]);
+ base::scoped_nsobject<NSImage> image(
+ [[NSImage alloc] initWithSize:kImageSize]);
decoration_.SetImage(image);
decoration_.SetFullLabel(kLongString);
diff --git a/chrome/browser/ui/cocoa/location_bar/image_decoration.h b/chrome/browser/ui/cocoa/location_bar/image_decoration.h
index 6b105ab..0bb4193 100644
--- a/chrome/browser/ui/cocoa/location_bar/image_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/image_decoration.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_
#define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_IMAGE_DECORATION_H_
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
// |LocationBarDecoration| which sizes and draws itself according to
@@ -27,7 +27,7 @@ class ImageDecoration : public LocationBarDecoration {
virtual void DrawInFrame(NSRect frame, NSView* control_view) OVERRIDE;
private:
- scoped_nsobject<NSImage> image_;
+ base::scoped_nsobject<NSImage> image_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
index db69b0d..2362f79 100644
--- a/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm
@@ -20,7 +20,8 @@ TEST_F(ImageDecorationTest, SetGetImage) {
EXPECT_FALSE(decoration_.GetImage());
const NSSize kImageSize = NSMakeSize(20.0, 20.0);
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:kImageSize]);
+ base::scoped_nsobject<NSImage> image(
+ [[NSImage alloc] initWithSize:kImageSize]);
decoration_.SetImage(image);
EXPECT_EQ(decoration_.GetImage(), image);
@@ -38,7 +39,8 @@ TEST_F(ImageDecorationTest, GetWidthForSpace) {
LocationBarDecoration::kOmittedWidth);
const NSSize kImageSize = NSMakeSize(20.0, 20.0);
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithSize:kImageSize]);
+ base::scoped_nsobject<NSImage> image(
+ [[NSImage alloc] initWithSize:kImageSize]);
// Decoration takes up the space of the image.
decoration_.SetImage(image);
diff --git a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
index 7a0e57e..cd218e8 100644
--- a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
@@ -9,7 +9,7 @@
#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
// Draws the keyword hint, "Press [tab] to search <site>".
@@ -32,14 +32,14 @@ class KeywordHintDecoration : public LocationBarDecoration {
NSImage* GetHintImage();
// Attributes for drawing the hint string, such as font and color.
- scoped_nsobject<NSDictionary> attributes_;
+ base::scoped_nsobject<NSDictionary> attributes_;
// Cache for the [tab] image.
- scoped_nsobject<NSImage> hint_image_;
+ base::scoped_nsobject<NSImage> hint_image_;
// The text to display to the left and right of the hint image.
- scoped_nsobject<NSString> hint_prefix_;
- scoped_nsobject<NSString> hint_suffix_;
+ base::scoped_nsobject<NSString> hint_prefix_;
+ base::scoped_nsobject<NSString> hint_suffix_;
DISALLOW_COPY_AND_ASSIGN(KeywordHintDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
index 37cbb84..13ff083 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
const CGFloat LocationBarDecoration::kOmittedWidth = 0.0;
@@ -75,7 +75,7 @@ NSFont* LocationBarDecoration::GetFont() const {
void LocationBarDecoration::DrawLabel(NSString* label,
NSDictionary* attributes,
const NSRect& frame) {
- scoped_nsobject<NSAttributedString> str(
+ base::scoped_nsobject<NSAttributedString> str(
[[NSAttributedString alloc] initWithString:label attributes:attributes]);
DrawAttributedString(str, frame);
}
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 7b07555..7bb35d1 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -9,7 +9,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
index 99dfba9..74f56cc 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
@@ -104,10 +104,10 @@ class PageActionDecoration : public ImageDecoration,
GURL current_url_;
// The string to show for a tooltip.
- scoped_nsobject<NSString> tooltip_;
+ base::scoped_nsobject<NSString> tooltip_;
// The context menu for the Page Action.
- scoped_nsobject<ExtensionActionContextMenu> menu_;
+ base::scoped_nsobject<ExtensionActionContextMenu> menu_;
// This is used for post-install visual feedback. The page_action
// icon is briefly shown even if it hasn't been enabled by its
diff --git a/chrome/browser/ui/cocoa/location_bar/plus_decoration.h b/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
index e318c70..64bcf70 100644
--- a/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/plus_decoration.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/location_bar/button_decoration.h"
#include "chrome/browser/ui/toolbar/action_box_button_controller.h"
@@ -54,7 +54,7 @@ class PlusDecoration : public ButtonDecoration,
void SetIcons(int normal_id, int hover_id, int pressed_id);
- scoped_nsobject<ActionBoxMenuBubbleController> menu_controller_;
+ base::scoped_nsobject<ActionBoxMenuBubbleController> menu_controller_;
DISALLOW_COPY_AND_ASSIGN(PlusDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
index bdd9e6f..000245c 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
@@ -33,9 +33,9 @@ class SelectedKeywordDecoration : public BubbleDecoration {
FRIEND_TEST_ALL_PREFIXES(SelectedKeywordDecorationTest,
UsesPartialKeywordIfNarrow);
- scoped_nsobject<NSImage> search_image_;
- scoped_nsobject<NSString> full_string_;
- scoped_nsobject<NSString> partial_string_;
+ base::scoped_nsobject<NSImage> search_image_;
+ base::scoped_nsobject<NSString> full_string_;
+ base::scoped_nsobject<NSString> partial_string_;
DISALLOW_COPY_AND_ASSIGN(SelectedKeywordDecoration);
};
diff --git a/chrome/browser/ui/cocoa/location_bar/star_decoration.h b/chrome/browser/ui/cocoa/location_bar/star_decoration.h
index 6ec7d0d..691f52e 100644
--- a/chrome/browser/ui/cocoa/location_bar/star_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/star_decoration.h
@@ -38,7 +38,7 @@ class StarDecoration : public ImageDecoration {
CommandUpdater* command_updater_; // Weak, owned by Browser.
// The string to show for a tooltip.
- scoped_nsobject<NSString> tooltip_;
+ base::scoped_nsobject<NSString> tooltip_;
// Whether the star icon is lit.
bool starred_;
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
index 7819a18..ffc1994 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
@@ -50,7 +50,7 @@ class ZoomDecoration : public ImageDecoration {
ZoomBubbleController* bubble_;
// The string to show for a tooltip.
- scoped_nsobject<NSString> tooltip_;
+ base::scoped_nsobject<NSString> tooltip_;
DISALLOW_COPY_AND_ASSIGN(ZoomDecoration);
};
diff --git a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
index fba3c01..dc3b678 100644
--- a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
+++ b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
@@ -6,7 +6,7 @@
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
@@ -73,7 +73,7 @@ class LoginHandlerMac : public LoginHandler,
WebContents* requesting_contents = GetWebContentsForLogin();
DCHECK(requesting_contents);
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[sheet_controller_ window]]);
constrained_window_.reset(new ConstrainedWindowMac(
@@ -121,7 +121,7 @@ class LoginHandlerMac : public LoginHandler,
}
// The Cocoa controller of the GUI.
- scoped_nsobject<LoginHandlerSheet> sheet_controller_;
+ base::scoped_nsobject<LoginHandlerSheet> sheet_controller_;
scoped_ptr<ConstrainedWindowMac> constrained_window_;
diff --git a/chrome/browser/ui/cocoa/menu_button.h b/chrome/browser/ui/cocoa/menu_button.h
index b2de8de..d0ffb58 100644
--- a/chrome/browser/ui/cocoa/menu_button.h
+++ b/chrome/browser/ui/cocoa/menu_button.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_button.h"
// This a button which displays a user-provided menu "attached" below it upon
@@ -24,10 +24,10 @@
// value is NO so that custom actions can be hooked up in Interface Builder.
@interface MenuButton : ToolbarButton {
@private
- scoped_nsobject<NSMenu> attachedMenu_;
+ base::scoped_nsobject<NSMenu> attachedMenu_;
BOOL openMenuOnClick_;
BOOL openMenuOnRightClick_;
- scoped_nsobject<NSPopUpButtonCell> popUpCell_;
+ base::scoped_nsobject<NSPopUpButtonCell> popUpCell_;
}
// The menu to display. Note that it should have no (i.e., a blank) title and
diff --git a/chrome/browser/ui/cocoa/menu_button.mm b/chrome/browser/ui/cocoa/menu_button.mm
index 8cc0812..d063974 100644
--- a/chrome/browser/ui/cocoa/menu_button.mm
+++ b/chrome/browser/ui/cocoa/menu_button.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/clickhold_button_cell.h"
#import "chrome/browser/ui/cocoa/nsview_additions.h"
diff --git a/chrome/browser/ui/cocoa/menu_button_unittest.mm b/chrome/browser/ui/cocoa/menu_button_unittest.mm
index 543208f..95b00dc 100644
--- a/chrome/browser/ui/cocoa/menu_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/menu_button_unittest.mm
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/clickhold_button_cell.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
@interface MenuButtonTestDelegate : NSObject<NSMenuDelegate> {
@private
- scoped_nsobject<NSMenu> menu_;
+ base::scoped_nsobject<NSMenu> menu_;
BOOL open_;
BOOL didOpen_;
}
@@ -60,10 +60,10 @@ class MenuButtonTest : public CocoaTest {
public:
MenuButtonTest() {
NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<MenuButton> button(
+ base::scoped_nsobject<MenuButton> button(
[[MenuButton alloc] initWithFrame:frame]);
button_ = button.get();
- scoped_nsobject<ClickHoldButtonCell> cell(
+ base::scoped_nsobject<ClickHoldButtonCell> cell(
[[ClickHoldButtonCell alloc] initTextCell:@"Testing"]);
[button_ setCell:cell.get()];
[[test_window() contentView] addSubview:button_];
@@ -102,7 +102,7 @@ TEST_VIEW(MenuButtonTest, button_);
// Test assigning a menu, again mostly to ensure nothing leaks or crashes.
TEST_F(MenuButtonTest, MenuAssign) {
- scoped_nsobject<NSMenu> menu(CreateMenu());
+ base::scoped_nsobject<NSMenu> menu(CreateMenu());
ASSERT_TRUE(menu.get());
[button_ setAttachedMenu:menu];
@@ -110,10 +110,10 @@ TEST_F(MenuButtonTest, MenuAssign) {
}
TEST_F(MenuButtonTest, OpenOnClick) {
- scoped_nsobject<NSMenu> menu(CreateMenu());
+ base::scoped_nsobject<NSMenu> menu(CreateMenu());
ASSERT_TRUE(menu.get());
- scoped_nsobject<MenuButtonTestDelegate> delegate(
+ base::scoped_nsobject<MenuButtonTestDelegate> delegate(
[[MenuButtonTestDelegate alloc] initWithMenu:menu.get()]);
ASSERT_TRUE(delegate.get());
@@ -132,10 +132,10 @@ TEST_F(MenuButtonTest, OpenOnClick) {
}
TEST_F(MenuButtonTest, OpenOnRightClick) {
- scoped_nsobject<NSMenu> menu(CreateMenu());
+ base::scoped_nsobject<NSMenu> menu(CreateMenu());
ASSERT_TRUE(menu.get());
- scoped_nsobject<MenuButtonTestDelegate> delegate(
+ base::scoped_nsobject<MenuButtonTestDelegate> delegate(
[[MenuButtonTestDelegate alloc] initWithMenu:menu.get()]);
ASSERT_TRUE(delegate.get());
@@ -157,10 +157,10 @@ TEST_F(MenuButtonTest, OpenOnRightClick) {
}
TEST_F(MenuButtonTest, DontOpenOnRightClickWithoutSetRightClick) {
- scoped_nsobject<NSMenu> menu(CreateMenu());
+ base::scoped_nsobject<NSMenu> menu(CreateMenu());
ASSERT_TRUE(menu.get());
- scoped_nsobject<MenuButtonTestDelegate> delegate(
+ base::scoped_nsobject<MenuButtonTestDelegate> delegate(
[[MenuButtonTestDelegate alloc] initWithMenu:menu.get()]);
ASSERT_TRUE(delegate.get());
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller.h b/chrome/browser/ui/cocoa/notifications/balloon_controller.h
index c63caed..7c9c00a 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller.h
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
class Balloon;
@@ -46,7 +46,7 @@ class NotificationOptionsMenuModel;
// The options menu that appears when "options" is pressed.
IBOutlet HoverImageButton* optionsButton_;
scoped_ptr<NotificationOptionsMenuModel> menuModel_;
- scoped_nsobject<MenuController> menuController_;
+ base::scoped_nsobject<MenuController> menuController_;
// The host for the renderer of the HTML contents.
scoped_ptr<BalloonViewHost> htmlContents_;
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
index 4ee0669..528d2f4 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
@@ -6,7 +6,7 @@
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
index 854e39a..10902b5 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_view.mm b/chrome/browser/ui/cocoa/notifications/balloon_view.mm
index eeac6fa..cb7911e 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_view.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_view.mm
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/notifications/balloon_controller.h"
#import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h"
diff --git a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h
index f8ca7b3..d78a910 100644
--- a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h
+++ b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h
@@ -8,7 +8,7 @@
#import <AppKit/AppKit.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "ui/message_center/message_center_tray_delegate.h"
@@ -59,13 +59,13 @@ class MessageCenterTrayBridge :
scoped_ptr<message_center::MessageCenterTray> tray_;
// Obj-C window controller for the notification tray.
- scoped_nsobject<MCTrayController> tray_controller_;
+ base::scoped_nsobject<MCTrayController> tray_controller_;
// View that is displayed on the system menu bar item.
- scoped_nsobject<MCStatusItemView> status_item_view_;
+ base::scoped_nsobject<MCStatusItemView> status_item_view_;
// Obj-C controller for the on-screen popup notifications.
- scoped_nsobject<MCPopupCollection> popup_collection_;
+ base::scoped_nsobject<MCPopupCollection> popup_collection_;
// Weak pointer factory to posts tasks to self.
base::WeakPtrFactory<MessageCenterTrayBridge> weak_ptr_factory_;
diff --git a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
index 2203913..c4c3dff 100644
--- a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
@@ -4,14 +4,14 @@
#import "chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
#import "ui/message_center/cocoa/status_item_view.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/notification.h"
-#import "ui/base/test/ui_cocoa_test_helper.h"
class MessageCenterTrayBridgeTest : public ui::CocoaTest {
public:
diff --git a/chrome/browser/ui/cocoa/nsmenuitem_additions_unittest.mm b/chrome/browser/ui/cocoa/nsmenuitem_additions_unittest.mm
index 90185bb..33ed98c 100644
--- a/chrome/browser/ui/cocoa/nsmenuitem_additions_unittest.mm
+++ b/chrome/browser/ui/cocoa/nsmenuitem_additions_unittest.mm
@@ -8,7 +8,7 @@
#include <ostream>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,7 +56,7 @@ void ExpectKeyFiresItemEq(bool result, NSEvent* key, NSMenuItem* item,
// key equivalent, even though the original event would) and isn't a good
// oracle function.
if (compareCocoa) {
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"Menu!"]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"Menu!"]);
[menu setAutoenablesItems:NO];
EXPECT_FALSE([menu performKeyEquivalent:key]);
[menu addItem:item];
diff --git a/chrome/browser/ui/cocoa/nsview_additions_unittest.mm b/chrome/browser/ui/cocoa/nsview_additions_unittest.mm
index ffb7e0f..a9b7468 100644
--- a/chrome/browser/ui/cocoa/nsview_additions_unittest.mm
+++ b/chrome/browser/ui/cocoa/nsview_additions_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/nsview_additions.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
@@ -38,9 +38,12 @@ typedef CocoaTest NSViewChromeAdditionsTest;
@end
TEST_F(NSViewChromeAdditionsTest, BelowAboveView) {
- scoped_nsobject<NSView> parent([[NSView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child1([[NSView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child2([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> parent(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child1(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child2(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
[parent addSubview:child1];
[parent addSubview:child2];
@@ -60,9 +63,12 @@ TEST_F(NSViewChromeAdditionsTest, BelowAboveView) {
}
TEST_F(NSViewChromeAdditionsTest, EnsurePosition) {
- scoped_nsobject<NSView> parent([[NSView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child1([[NSView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child2([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> parent(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child1(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child2(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
[parent addSubview:child1];
[parent cr_ensureSubview:child2
@@ -81,10 +87,12 @@ TEST_F(NSViewChromeAdditionsTest, EnsurePosition) {
// Verify that no view is removed or added when no change is needed.
TEST_F(NSViewChromeAdditionsTest, EnsurePositionNoChange) {
- scoped_nsobject<ParentView> parent(
+ base::scoped_nsobject<ParentView> parent(
[[ParentView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child1([[NSView alloc] initWithFrame:NSZeroRect]);
- scoped_nsobject<NSView> child2([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child1(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> child2(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
[parent addSubview:child1];
[parent addSubview:child2];
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
index 629d572..7271416 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/omnibox/omnibox_popup_view.h"
@@ -126,10 +126,10 @@ class OmniboxPopupViewMac : public OmniboxPopupView {
NSTextField* field_; // owned by tab controller
// Child window containing a matrix which implements the popup.
- scoped_nsobject<NSWindow> popup_;
+ base::scoped_nsobject<NSWindow> popup_;
NSRect targetPopupFrame_;
- scoped_nsobject<AutocompleteMatrix> autocomplete_matrix_;
+ base::scoped_nsobject<AutocompleteMatrix> autocomplete_matrix_;
DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewMac);
};
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
index 9ba9aad..e396c36 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
@@ -317,7 +317,7 @@ void OmniboxPopupViewMac::CreatePopupIfNeeded() {
[popup_ setLevel:NSNormalWindowLevel];
// Use a flipped view to pin the matrix top the top left. This is needed
// for animated resize.
- scoped_nsobject<FlippedView> contentView(
+ base::scoped_nsobject<FlippedView> contentView(
[[FlippedView alloc] initWithFrame:NSZeroRect]);
[popup_ setContentView:contentView];
@@ -366,7 +366,7 @@ void OmniboxPopupViewMac::PositionPopup(const CGFloat matrixHeight) {
bool animate = (NSHeight(popupFrame) < NSHeight(currentPopupFrame) &&
NSWidth(popupFrame) == NSWidth(currentPopupFrame));
- scoped_nsobject<NSDictionary> savedAnimations;
+ base::scoped_nsobject<NSDictionary> savedAnimations;
if (!animate) {
// In an ideal world, running a zero-length animation would cancel any
// running animations and set the new frame value immediately. In practice,
@@ -583,7 +583,7 @@ void OmniboxPopupViewMac::OpenURLForRow(int row, bool force_background) {
options |= NSTrackingActiveInActiveApp;
options |= NSTrackingInVisibleRect;
- scoped_nsobject<NSTrackingArea> trackingArea(
+ base::scoped_nsobject<NSTrackingArea> trackingArea(
[[NSTrackingArea alloc] initWithRect:[self frame]
options:options
owner:self
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
index de68daf..fd14f3c 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
@@ -449,7 +449,7 @@ TEST_F(OmniboxPopupViewMacTest, ElideString) {
NSDictionary* attributes =
[NSDictionary dictionaryWithObject:font_.GetNativeFont()
forKey:NSFontAttributeName];
- scoped_nsobject<NSMutableAttributedString> as(
+ base::scoped_nsobject<NSMutableAttributedString> as(
[[NSMutableAttributedString alloc] initWithString:contents
attributes:attributes]);
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
index 68ba860..27711fd 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -149,8 +149,8 @@ OmniboxViewMac::OmniboxViewMac(OmniboxEditController* controller,
[field_ setAllowsEditingTextAttributes:YES];
// Get the appropriate line height for the font that we use.
- scoped_nsobject<NSLayoutManager>
- layoutManager([[NSLayoutManager alloc] init]);
+ base::scoped_nsobject<NSLayoutManager> layoutManager(
+ [[NSLayoutManager alloc] init]);
[layoutManager setUsesScreenFonts:YES];
}
@@ -435,8 +435,8 @@ void OmniboxViewMac::ApplyTextAttributes(const string16& display_text,
// Make a paragraph style locking in the standard line height as the maximum,
// otherwise the baseline may shift "downwards".
- scoped_nsobject<NSMutableParagraphStyle>
- paragraph_style([[NSMutableParagraphStyle alloc] init]);
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraph_style(
+ [[NSMutableParagraphStyle alloc] init]);
CGFloat line_height = [[field_ cell] lineHeight];
[paragraph_style setMaximumLineHeight:line_height];
[paragraph_style setMinimumLineHeight:line_height];
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
index 308d065..e9d77a3 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm
@@ -146,7 +146,7 @@ TEST_F(OmniboxViewMacTest, TabToAutocomplete) {
TEST_F(OmniboxViewMacTest, SetInstantSuggestion) {
const NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<AutocompleteTextField> field(
+ base::scoped_nsobject<AutocompleteTextField> field(
[[AutocompleteTextField alloc] initWithFrame:frame]);
TestingToolbarModelDelegate delegate;
diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h
index 4676267..5298ef0 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/callback.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
@@ -17,7 +17,7 @@
// Displays the one-click signin confirmation bubble
@interface OneClickSigninBubbleController : BaseBubbleController {
- scoped_nsobject<OneClickSigninViewController> viewController_;
+ base::scoped_nsobject<OneClickSigninViewController> viewController_;
@private
IBOutlet NSTextField* messageTextField_;
}
diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
index 6126103..a3d97fa 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
@@ -44,7 +44,7 @@ void PerformClose(OneClickSigninBubbleController* controller) {
// Create an empty window into which content is placed.
NSRect viewBounds = [[viewController_ view] bounds];
- scoped_nsobject<InfoBubbleWindow> window(
+ base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:viewBounds
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_browsertest.mm b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_browsertest.mm
index 1d4db26..0387770 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_browsertest.mm
@@ -39,7 +39,7 @@ class OneClickSigninBubbleControllerTest : public InProcessBrowserTest {
[[controller_ viewController] nibName]);
}
- scoped_nsobject<OneClickSigninBubbleController> controller_;
+ base::scoped_nsobject<OneClickSigninBubbleController> controller_;
int callback_count_;
private:
diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_unittest.mm
index 86ac826..a60e3a2 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller_unittest.mm
@@ -8,12 +8,12 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/weak_ptr.h"
#import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
-#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
#import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h"
+#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
@@ -54,7 +54,7 @@ class OneClickSigninBubbleControllerTest : public CocoaProfileTest {
protected:
base::WeakPtrFactory<OneClickSigninBubbleControllerTest> weak_ptr_factory_;
BrowserWindow::StartSyncCallback start_sync_callback_;
- scoped_nsobject<OneClickSigninBubbleController> controller_;
+ base::scoped_nsobject<OneClickSigninBubbleController> controller_;
private:
DISALLOW_COPY_AND_ASSIGN(OneClickSigninBubbleControllerTest);
diff --git a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h
index 2cfa36b..4a7f082 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h
+++ b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -40,7 +40,7 @@ class OneClickSigninDialogController : public ConstrainedWindowMacDelegate {
void PerformClose();
scoped_ptr<ConstrainedWindowMac> constrained_window_;
- scoped_nsobject<OneClickSigninViewController> view_controller_;
+ base::scoped_nsobject<OneClickSigninViewController> view_controller_;
};
#endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
diff --git a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
index 00b5a08..6078a50 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
@@ -22,13 +22,12 @@ OneClickSigninDialogController::OneClickSigninDialogController(
closeCallback:close_callback
isSyncDialog:YES
errorMessage:nil]);
- scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
+ base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
initWithContentRect:[[view_controller_ view] bounds]]);
[[window contentView] addSubview:[view_controller_ view]];
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
- [[CustomConstrainedWindowSheet alloc]
- initWithCustomWindow:window]);
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
constrained_window_.reset(new ConstrainedWindowMac(
this, web_contents, sheet));
}
diff --git a/chrome/browser/ui/cocoa/one_click_signin_view_controller.h b/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
index 004ed34..02d71ae 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
+++ b/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/callback.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser_window.h"
@class BrowserWindowController;
@@ -31,13 +31,13 @@ class WebContents;
// This is YES if the user clicked the Learn More link before another action.
BOOL clickedLearnMore_;
- scoped_nsobject<NSString> errorMessage_;
+ base::scoped_nsobject<NSString> errorMessage_;
// Text fields don't work as well with embedded links as text views, but
// text views cannot conveniently be created in IB. The xib file contains
// a text field |informativePlaceholderTextField_| that's replaced by this
// text view |promo_| in -awakeFromNib.
- scoped_nsobject<HyperlinkTextView> informativeTextView_;
+ base::scoped_nsobject<HyperlinkTextView> informativeTextView_;
BrowserWindow::StartSyncCallback startSyncCallback_;
base::Closure closeCallback_;
content::WebContents* webContents_;
diff --git a/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm b/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
index b0eda33..a817812 100644
--- a/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
@@ -296,7 +296,7 @@ TEST_F(PanelCocoaTest, TitlebarViewClose) {
TEST_F(PanelCocoaTest, MenuItems) {
Panel* panel = CreateTestPanel("Test Panel");
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
NSMenuItem* close_tab_menu_item = CreateMenuItem(menu, IDC_CLOSE_TAB);
NSMenuItem* new_tab_menu_item = CreateMenuItem(menu, IDC_NEW_TAB);
NSMenuItem* new_tab_window_item = CreateMenuItem(menu, IDC_NEW_WINDOW);
diff --git a/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h b/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h
index 35824de..442044c 100644
--- a/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.h
@@ -11,7 +11,7 @@
#include <map>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "ui/gfx/rect.h"
@@ -70,7 +70,7 @@ class PanelStackWindowCocoa : public NativePanelStackWindow {
NativePanelStackWindowDelegate* delegate_;
// The underlying window.
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSWindow> window_;
Panels panels_;
@@ -85,7 +85,8 @@ class PanelStackWindowCocoa : public NativePanelStackWindow {
// Used to animate the bounds changes at a synchronized pace.
// Lifetime controlled manually, needs more than just |release| to terminate.
NSViewAnimation* bounds_animation_;
- scoped_nsobject<BatchBoundsAnimationDelegate> bounds_animation_delegate_;
+ base::scoped_nsobject<BatchBoundsAnimationDelegate>
+ bounds_animation_delegate_;
DISALLOW_COPY_AND_ASSIGN(PanelStackWindowCocoa);
};
diff --git a/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm
index ee2045d..90ba6e0 100644
--- a/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/panels/panel_stack_window_cocoa.mm
@@ -226,7 +226,7 @@ void PanelStackWindowCocoa::EndBatchUpdatePanelBounds() {
int num_of_animations = 1;
if (need_to_animate_individual_panels)
num_of_animations += bounds_updates_.size();
- scoped_nsobject<NSMutableArray> animations(
+ base::scoped_nsobject<NSMutableArray> animations(
[[NSMutableArray alloc] initWithCapacity:num_of_animations]);
// Add the animation for each panel in the update list.
diff --git a/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h b/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h
index e353fb4..dc139e5 100644
--- a/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h
+++ b/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.h
@@ -61,12 +61,12 @@
BOOL isDrawingAttention_;
// "Glint" animation is used in "Draw Attention" mode.
- scoped_nsobject<RepaintAnimation> glintAnimation_;
- scoped_nsobject<NSTimer> glintAnimationTimer_;
+ base::scoped_nsobject<RepaintAnimation> glintAnimation_;
+ base::scoped_nsobject<NSTimer> glintAnimationTimer_;
int glintCounter_;
// Drag support.
- scoped_nsobject<MouseDragController> dragController_;
+ base::scoped_nsobject<MouseDragController> dragController_;
}
// Callbacks from Close, Minimize, and Restore buttons.
diff --git a/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.mm
index 673e628..65cb230 100644
--- a/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/panels/panel_titlebar_view_cocoa.mm
@@ -146,7 +146,7 @@ static NSEvent* MakeMouseEvent(NSEventType type,
NSRectFillUsingOperation([self bounds], NSCompositeSourceOver);
if ([glintAnimation_ isAnimating]) {
- scoped_nsobject<NSGradient> glint([NSGradient alloc]);
+ base::scoped_nsobject<NSGradient> glint([NSGradient alloc]);
float currentAlpha = 0.8 * [glintAnimation_ currentValue];
NSColor* startColor = [NSColor colorWithCalibratedWhite:1.0
alpha:currentAlpha];
diff --git a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
index 3e8bc57..6627170 100644
--- a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
+++ b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h
@@ -11,7 +11,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/chrome_browser_window.h"
#include "chrome/browser/ui/panels/panel.h"
@@ -29,7 +29,7 @@ class PanelCocoa;
@private
IBOutlet PanelTitlebarViewCocoa* titlebar_view_;
scoped_ptr<PanelCocoa> windowShim_;
- scoped_nsobject<NSString> pendingWindowTitle_;
+ base::scoped_nsobject<NSString> pendingWindowTitle_;
NSViewAnimation* boundsAnimation_; // Lifetime controlled manually, needs
// more then just |release| to terminate.
BOOL animateOnBoundsChange_;
@@ -42,7 +42,7 @@ class PanelCocoa;
// window over other application windows due to panels having a higher
// priority NSWindowLevel, so we distinguish between the two scenarios.
BOOL activationRequestedByPanel_;
- scoped_nsobject<NSView> overlayView_;
+ base::scoped_nsobject<NSView> overlayView_;
}
// Load the window nib and do any Cocoa-specific initialization.
diff --git a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
index c335faa..fbd7e32 100644
--- a/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm
@@ -112,12 +112,12 @@ const double kWidthOfMouseResizeArea = 4.0;
@interface PanelResizeByMouseOverlay : NSView <MouseDragControllerClient> {
@private
Panel* panel_;
- scoped_nsobject<MouseDragController> dragController_;
- scoped_nsobject<NSCursor> dragCursor_;
- scoped_nsobject<NSCursor> eastWestCursor_;
- scoped_nsobject<NSCursor> northSouthCursor_;
- scoped_nsobject<NSCursor> northEastSouthWestCursor_;
- scoped_nsobject<NSCursor> northWestSouthEastCursor_;
+ base::scoped_nsobject<MouseDragController> dragController_;
+ base::scoped_nsobject<NSCursor> dragCursor_;
+ base::scoped_nsobject<NSCursor> eastWestCursor_;
+ base::scoped_nsobject<NSCursor> northSouthCursor_;
+ base::scoped_nsobject<NSCursor> northEastSouthWestCursor_;
+ base::scoped_nsobject<NSCursor> northWestSouthEastCursor_;
NSRect leftCursorRect_;
NSRect rightCursorRect_;
NSRect topCursorRect_;
diff --git a/chrome/browser/ui/cocoa/presentation_mode_controller.h b/chrome/browser/ui/cocoa/presentation_mode_controller.h
index 728c2da..8af03b4 100644
--- a/chrome/browser/ui/cocoa/presentation_mode_controller.h
+++ b/chrome/browser/ui/cocoa/presentation_mode_controller.h
@@ -45,16 +45,16 @@
// hidden, we still need to keep a 1px tall tracking area visible. Attaching
// to the content view allows us to do this. |trackingArea_| can be nil if
// not in presentation mode or during animations.
- scoped_nsobject<NSTrackingArea> trackingArea_;
+ base::scoped_nsobject<NSTrackingArea> trackingArea_;
// Pointer to the currently running animation. Is nil if no animation is
// running.
- scoped_nsobject<DropdownAnimation> currentAnimation_;
+ base::scoped_nsobject<DropdownAnimation> currentAnimation_;
// Timers for scheduled showing/hiding of the bar (which are always done with
// animation).
- scoped_nsobject<NSTimer> showTimer_;
- scoped_nsobject<NSTimer> hideTimer_;
+ base::scoped_nsobject<NSTimer> showTimer_;
+ base::scoped_nsobject<NSTimer> hideTimer_;
// Holds the current bounds of |trackingArea_|, even if |trackingArea_| is
// currently nil. Used to restore the tracking area when an animation
diff --git a/chrome/browser/ui/cocoa/profile_menu_controller.h b/chrome/browser/ui/cocoa/profile_menu_controller.h
index 1610fa6..c2b17aa 100644
--- a/chrome/browser/ui/cocoa/profile_menu_controller.h
+++ b/chrome/browser/ui/cocoa/profile_menu_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
class AvatarMenuModel;
diff --git a/chrome/browser/ui/cocoa/profile_menu_controller.mm b/chrome/browser/ui/cocoa/profile_menu_controller.mm
index 4f08ec4..0ef2503 100644
--- a/chrome/browser/ui/cocoa/profile_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/profile_menu_controller.mm
@@ -66,8 +66,7 @@ class Observer : public chrome::BrowserListObserver,
if ((self = [super init])) {
mainMenuItem_ = item;
- scoped_nsobject<NSMenu> menu(
- [[NSMenu alloc] initWithTitle:
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:
l10n_util::GetNSStringWithFixup(IDS_PROFILES_OPTIONS_GROUP_NAME)]);
[mainMenuItem_ setSubmenu:menu];
@@ -110,7 +109,7 @@ class Observer : public chrome::BrowserListObserver,
if (dock) {
NSString* headerName =
l10n_util::GetNSStringWithFixup(IDS_PROFILES_OPTIONS_GROUP_NAME);
- scoped_nsobject<NSMenuItem> header(
+ base::scoped_nsobject<NSMenuItem> header(
[[NSMenuItem alloc] initWithTitle:headerName
action:NULL
keyEquivalent:@""]);
@@ -213,7 +212,7 @@ class Observer : public chrome::BrowserListObserver,
}
- (NSMenuItem*)createItemWithTitle:(NSString*)title action:(SEL)sel {
- scoped_nsobject<NSMenuItem> item(
+ base::scoped_nsobject<NSMenuItem> item(
[[NSMenuItem alloc] initWithTitle:title action:sel keyEquivalent:@""]);
[item setTarget:self];
return [item.release() autorelease];
diff --git a/chrome/browser/ui/cocoa/profile_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/profile_menu_controller_unittest.mm
index 06f22b39..60c297c 100644
--- a/chrome/browser/ui/cocoa/profile_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profile_menu_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/profile_menu_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/profiles/avatar_menu_model.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -71,8 +71,8 @@ class ProfileMenuControllerTest : public CocoaProfileTest {
NSMenuItem* menu_item() { return item_.get(); }
private:
- scoped_nsobject<NSMenuItem> item_;
- scoped_nsobject<ProfileMenuController> controller_;
+ base::scoped_nsobject<NSMenuItem> item_;
+ base::scoped_nsobject<ProfileMenuController> controller_;
};
TEST_F(ProfileMenuControllerTest, InitializeMenu) {
@@ -124,7 +124,7 @@ TEST_F(ProfileMenuControllerTest, RebuildMenu) {
}
TEST_F(ProfileMenuControllerTest, InsertItems) {
- scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle: @""]);
+ base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
ASSERT_EQ(0, [menu numberOfItems]);
// With only one profile, insertItems should be a no-op.
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h b/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h
index 561c0d6..227840e 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h
@@ -11,7 +11,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
@@ -49,7 +49,7 @@ class ProfileSigninConfirmationDialogCocoa : ConstrainedWindowMacDelegate {
virtual void OnConstrainedWindowClosed(ConstrainedWindowMac* window) OVERRIDE;
// Controller for the dialog view.
- scoped_nsobject<ProfileSigninConfirmationViewController> controller_;
+ base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_;
// The constrained window that contains the dialog view.
scoped_ptr<ConstrainedWindowMac> window_;
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.mm
index 44fb43f..c1c8a49 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.mm
@@ -72,13 +72,11 @@ ProfileSigninConfirmationDialogCocoa::ProfileSigninConfirmationDialogCocoa(
offerProfileCreation:offer_profile_creation]);
// Setup the constrained window that will show the view.
- scoped_nsobject<NSWindow> window(
- [[ConstrainedWindowCustomWindow alloc]
- initWithContentRect:[[controller_ view] bounds]]);
+ base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
+ initWithContentRect:[[controller_ view] bounds]]);
[[window contentView] addSubview:[controller_ view]];
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
- [[CustomConstrainedWindowSheet alloc]
- initWithCustomWindow:window]);
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
window_.reset(new ConstrainedWindowMac(this, web_contents, sheet));
}
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h
index b1e4df6..ffde5c4 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/callback.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
@class HyperlinkTextView;
@@ -38,14 +38,14 @@ class ProfileSigninConfirmationDelegate;
base::Closure closeDialogCallback_;
// UI elements.
- scoped_nsobject<NSBox> promptBox_;
- scoped_nsobject<NSButton> closeButton_;
- scoped_nsobject<NSTextField> titleField_;
- scoped_nsobject<NSTextField> promptField_;
- scoped_nsobject<NSTextView> explanationField_;
- scoped_nsobject<ConstrainedWindowButton> createProfileButton_;
- scoped_nsobject<ConstrainedWindowButton> cancelButton_;
- scoped_nsobject<ConstrainedWindowButton> okButton_;
+ base::scoped_nsobject<NSBox> promptBox_;
+ base::scoped_nsobject<NSButton> closeButton_;
+ base::scoped_nsobject<NSTextField> titleField_;
+ base::scoped_nsobject<NSTextField> promptField_;
+ base::scoped_nsobject<NSTextView> explanationField_;
+ base::scoped_nsobject<ConstrainedWindowButton> createProfileButton_;
+ base::scoped_nsobject<ConstrainedWindowButton> cancelButton_;
+ base::scoped_nsobject<ConstrainedWindowButton> okButton_;
}
- (id)initWithBrowser:(Browser*)browser
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
index 1aacda3..367556b 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
@@ -59,7 +59,7 @@ NSRect ComputeFrame(NSAttributedString* text, CGFloat width, CGFloat height) {
// Make the indicated range of characters in a text view bold.
void MakeTextBold(NSTextField* textField, int offset, int length) {
- scoped_nsobject<NSMutableAttributedString> text(
+ base::scoped_nsobject<NSMutableAttributedString> text(
[[textField attributedStringValue] mutableCopy]);
NSFont* currentFont =
[text attribute:NSFontAttributeName
@@ -96,7 +96,7 @@ NSTextView* AddTextView(
const string16& link,
int offset,
const ui::ResourceBundle::FontStyle& font_style) {
- scoped_nsobject<HyperlinkTextView> textView(
+ base::scoped_nsobject<HyperlinkTextView> textView(
[[HyperlinkTextView alloc] initWithFrame:NSZeroRect]);
NSFont* font = ui::ResourceBundle::GetSharedInstance().GetFont(
font_style).GetNativeFont();
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
index d1d38aa..0d5a5c4 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
@@ -6,7 +6,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/browser.h"
@@ -69,10 +69,10 @@ class ProfileSigninConfirmationViewControllerTest
void OnClose() { closed_ = true; }
// The window containing the dialog.
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSWindow> window_;
// Dialog under test.
- scoped_nsobject<ProfileSigninConfirmationViewController> controller_;
+ base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_;
// Visible for testing UI interactions.
bool continued_;
diff --git a/chrome/browser/ui/cocoa/run_loop_testing.mm b/chrome/browser/ui/cocoa/run_loop_testing.mm
index b85722a..9918c90 100644
--- a/chrome/browser/ui/cocoa/run_loop_testing.mm
+++ b/chrome/browser/ui/cocoa/run_loop_testing.mm
@@ -6,7 +6,7 @@
#import <Foundation/Foundation.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_pump_mac.h"
// This class is scheduled with a delayed selector to quit the message pump.
@@ -42,7 +42,7 @@ void NSRunLoopRunAllPending() {
// Put a delayed selector on the queue. All other pending delayed selectors
// will run before this, after which the internal loop can end.
- scoped_nsobject<CocoaQuitTask> quit_task(
+ base::scoped_nsobject<CocoaQuitTask> quit_task(
[[CocoaQuitTask alloc] initWithMessagePump:message_pump]);
[quit_task performSelector:@selector(doQuit)
diff --git a/chrome/browser/ui/cocoa/run_loop_testing_unittest.mm b/chrome/browser/ui/cocoa/run_loop_testing_unittest.mm
index d281c46..760f985 100644
--- a/chrome/browser/ui/cocoa/run_loop_testing_unittest.mm
+++ b/chrome/browser/ui/cocoa/run_loop_testing_unittest.mm
@@ -6,7 +6,7 @@
#import <Foundation/Foundation.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
@interface TestDelayed : NSObject {
@@ -36,7 +36,7 @@
@end
TEST(RunLoopTesting, RunAllPending) {
- scoped_nsobject<TestDelayed> tester([[TestDelayed alloc] init]);
+ base::scoped_nsobject<TestDelayed> tester([[TestDelayed alloc] init]);
EXPECT_FALSE([tester didWork]);
chrome::testing::NSRunLoopRunAllPending();
@@ -45,8 +45,8 @@ TEST(RunLoopTesting, RunAllPending) {
}
TEST(RunLoopTesting, NestedWork) {
- scoped_nsobject<TestDelayed> tester([[TestDelayed alloc] init]);
- scoped_nsobject<TestDelayed> nested([[TestDelayed alloc] init]);
+ base::scoped_nsobject<TestDelayed> tester([[TestDelayed alloc] init]);
+ base::scoped_nsobject<TestDelayed> nested([[TestDelayed alloc] init]);
[tester setNext:nested];
EXPECT_FALSE([tester didWork]);
diff --git a/chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm b/chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm
index eb48acb..c308f5a 100644
--- a/chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm
@@ -6,7 +6,7 @@
#include "chrome/browser/speech/speech_recognition_bubble.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
@@ -35,7 +35,7 @@ class SpeechRecognitionBubbleImpl : public SpeechRecognitionBubbleBase {
virtual void UpdateImage() OVERRIDE;
private:
- scoped_nsobject<SpeechRecognitionWindowController> window_;
+ base::scoped_nsobject<SpeechRecognitionWindowController> window_;
Delegate* delegate_;
gfx::Rect element_rect_;
};
diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h
index 49b080c..ce94e3c 100644
--- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h
+++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h
@@ -9,8 +9,8 @@
#include <vector>
#include "base/mac/scoped_cftyperef.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ssl/ssl_client_certificate_selector.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
@@ -29,9 +29,9 @@ class SSLClientAuthObserverCocoaBridge;
std::vector<scoped_refptr<net::X509Certificate> > certificates_;
// A C++ object to bridge SSLClientAuthObserver notifications to us.
scoped_ptr<SSLClientAuthObserverCocoaBridge> observer_;
- scoped_nsobject<SFChooseIdentityPanel> panel_;
+ base::scoped_nsobject<SFChooseIdentityPanel> panel_;
scoped_ptr<ConstrainedWindowMac> constrainedWindow_;
- scoped_nsobject<NSWindow> overlayWindow_;
+ base::scoped_nsobject<NSWindow> overlayWindow_;
BOOL closePending_;
// A copy of the sheet's frame used to restore on show.
NSRect oldSheetFrame_;
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index 99f8d98..e5e46e0a 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -374,7 +374,7 @@ void StatusBubbleMac::Create() {
// teardown sequence in BWC guarantees that |parent_| outlives the status
// bubble and that the StatusBubble is torn down completely prior to the
// window going away.
- scoped_nsobject<BubbleView> view(
+ base::scoped_nsobject<BubbleView> view(
[[BubbleView alloc] initWithFrame:NSZeroRect themeProvider:parent_]);
[window_ setContentView:view];
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
index b25225f..ffd903b 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
@@ -4,7 +4,7 @@
#include <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -175,7 +175,7 @@ class StatusBubbleMacTest : public CocoaTest {
}
base::MessageLoop message_loop_;
- scoped_nsobject<StatusBubbleMacTestDelegate> delegate_;
+ base::scoped_nsobject<StatusBubbleMacTestDelegate> delegate_;
StatusBubbleMac* bubble_; // Strong.
};
diff --git a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
index 51fa138..8b380c4 100644
--- a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
+++ b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "chrome/browser/status_icons/desktop_notification_balloon.h"
#include "chrome/browser/status_icons/status_icon.h"
@@ -46,18 +46,18 @@ class StatusIconMac : public StatusIcon {
// Getter for item_ that allows lazy initialization.
NSStatusItem* item();
- scoped_nsobject<NSStatusItem> item_;
+ base::scoped_nsobject<NSStatusItem> item_;
- scoped_nsobject<StatusItemController> controller_;
+ base::scoped_nsobject<StatusItemController> controller_;
// Notification balloon.
DesktopNotificationBalloon notification_;
- scoped_nsobject<NSString> toolTip_;
+ base::scoped_nsobject<NSString> toolTip_;
// Status menu shown when right-clicking the system icon, if it has been
// created by |UpdatePlatformContextMenu|.
- scoped_nsobject<MenuController> menu_;
+ base::scoped_nsobject<MenuController> menu_;
DISALLOW_COPY_AND_ASSIGN(StatusIconMac);
};
diff --git a/chrome/browser/ui/cocoa/styled_text_field_cell_unittest.mm b/chrome/browser/ui/cocoa/styled_text_field_cell_unittest.mm
index 076583f..a01c2c4 100644
--- a/chrome/browser/ui/cocoa/styled_text_field_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/styled_text_field_cell_unittest.mm
@@ -4,10 +4,10 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
#import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -24,13 +24,13 @@ class StyledTextFieldCellTest : public CocoaTest {
// decorations.
const NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<StyledTextFieldTestCell> cell(
+ base::scoped_nsobject<StyledTextFieldTestCell> cell(
[[StyledTextFieldTestCell alloc] initTextCell:@"Testing"]);
cell_ = cell.get();
[cell_ setEditable:YES];
[cell_ setBordered:YES];
- scoped_nsobject<NSTextField> view(
+ base::scoped_nsobject<NSTextField> view(
[[NSTextField alloc] initWithFrame:frame]);
view_ = view.get();
[view_ setCell:cell_];
diff --git a/chrome/browser/ui/cocoa/styled_text_field_unittest.mm b/chrome/browser/ui/cocoa/styled_text_field_unittest.mm
index c4f066c..0a8ebe9 100644
--- a/chrome/browser/ui/cocoa/styled_text_field_unittest.mm
+++ b/chrome/browser/ui/cocoa/styled_text_field_unittest.mm
@@ -4,11 +4,11 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/styled_text_field.h"
#import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
#import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -24,13 +24,13 @@ class StyledTextFieldTest : public CocoaTest {
// decorations.
NSRect frame = NSMakeRect(0, 0, kWidth, 30);
- scoped_nsobject<StyledTextFieldTestCell> cell(
+ base::scoped_nsobject<StyledTextFieldTestCell> cell(
[[StyledTextFieldTestCell alloc] initTextCell:@"Testing"]);
cell_ = cell.get();
[cell_ setEditable:YES];
[cell_ setBordered:YES];
- scoped_nsobject<StyledTextField> field(
+ base::scoped_nsobject<StyledTextField> field(
[[StyledTextField alloc] initWithFrame:frame]);
field_ = field.get();
[field_ setCell:cell_];
diff --git a/chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_unittest.mm
index 7254a31..f09da20 100644
--- a/chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/tab_contents/overlay_separator_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
class OverlayBottomSeparatorViewTest : public CocoaTest {
@@ -17,7 +17,7 @@ class OverlayBottomSeparatorViewTest : public CocoaTest {
}
protected:
- scoped_nsobject<OverlayBottomSeparatorView> bottom_view_;
+ base::scoped_nsobject<OverlayBottomSeparatorView> bottom_view_;
private:
DISALLOW_COPY_AND_ASSIGN(OverlayBottomSeparatorViewTest);
@@ -39,7 +39,7 @@ class OverlayTopSeparatorViewTest : public CocoaTest {
}
protected:
- scoped_nsobject<OverlayTopSeparatorView> top_view_;
+ base::scoped_nsobject<OverlayTopSeparatorView> top_view_;
private:
DISALLOW_COPY_AND_ASSIGN(OverlayTopSeparatorViewTest);
diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h
index 15ef7a6..9504653 100644
--- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h
+++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/common/instant_types.h"
@@ -33,7 +33,7 @@ class WebContents;
@interface OverlayableContentsController : NSViewController {
@private
// Container view for the "active" contents.
- scoped_nsobject<NSView> activeContainer_;
+ base::scoped_nsobject<NSView> activeContainer_;
// The overlay WebContents. Will be NULL if no overlay is currently showing.
content::WebContents* overlayContents_; // weak
@@ -50,11 +50,11 @@ class WebContents;
BOOL drawDropShadow_;
// View responsible for drawing a drop shadow.
- scoped_nsobject<NSView> dropShadowView_;
+ base::scoped_nsobject<NSView> dropShadowView_;
// View responsible for drawing a separator at the top. The separator is
// only visible when the overlay is positioned right next to the omnibox.
- scoped_nsobject<NSView> topSeparatorView_;
+ base::scoped_nsobject<NSView> topSeparatorView_;
BrowserWindowController* windowController_;
diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
index a7ec256..83bb984 100644
--- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm
@@ -28,7 +28,8 @@
windowController:(BrowserWindowController*)windowController {
if ((self = [super init])) {
windowController_ = windowController;
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
[view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[view setAutoresizesSubviews:NO];
[[NSNotificationCenter defaultCenter]
diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm
index d2e115d..d096f9e 100644
--- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm
@@ -78,7 +78,7 @@ class OverlayableContentsControllerTest : public InProcessBrowserTest,
protected:
InstantOverlayModel instant_overlay_model_;
scoped_ptr<content::WebContents> web_contents_;
- scoped_nsobject<OverlayableContentsController> controller_;
+ base::scoped_nsobject<OverlayableContentsController> controller_;
content::NotificationRegistrar registrar_;
int visibility_changed_count_;
};
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
index 35f8177..c43503a 100644
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
+++ b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/tab_contents/render_view_context_menu.h"
@class MenuController;
@@ -59,7 +59,7 @@ class RenderViewContextMenuMac : public RenderViewContextMenu {
void StopSpeaking();
// The Cocoa menu controller for this menu.
- scoped_nsobject<MenuController> menu_controller_;
+ base::scoped_nsobject<MenuController> menu_controller_;
// Model for the "Speech" submenu.
ui::SimpleMenuModel speech_submenu_model_;
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
index 1581632..42d2197 100644
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
@@ -5,8 +5,8 @@
#include "chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h"
#include "base/compiler_specific.h"
+#include "base/mac/scoped_nsobject.h"
#import "base/mac/scoped_sending_event.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
index 439e539..91fc745 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/sad_tab.h"
#import <Cocoa/Cocoa.h>
@@ -27,7 +27,7 @@ class SadTabCocoa : public SadTab {
virtual void Show() OVERRIDE;
virtual void Close() OVERRIDE;
- scoped_nsobject<SadTabController> sad_tab_controller_;
+ base::scoped_nsobject<SadTabController> sad_tab_controller_;
content::WebContents* web_contents_;
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
index 5c2e9254..0067968 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/debug/debugger.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
#import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
@@ -75,7 +75,7 @@ class SadTabControllerTest : public ChromeRenderViewHostTestHarness {
bool SadTabControllerTest::link_clicked_;
TEST_F(SadTabControllerTest, WithTabContents) {
- scoped_nsobject<SadTabController> controller(CreateController());
+ base::scoped_nsobject<SadTabController> controller(CreateController());
EXPECT_TRUE(controller);
HyperlinkTextView* help = GetHelpTextView(controller);
EXPECT_TRUE(help);
@@ -83,14 +83,14 @@ TEST_F(SadTabControllerTest, WithTabContents) {
TEST_F(SadTabControllerTest, WithoutTabContents) {
DeleteContents();
- scoped_nsobject<SadTabController> controller(CreateController());
+ base::scoped_nsobject<SadTabController> controller(CreateController());
EXPECT_TRUE(controller);
HyperlinkTextView* help = GetHelpTextView(controller);
EXPECT_FALSE(help);
}
TEST_F(SadTabControllerTest, ClickOnLink) {
- scoped_nsobject<SadTabController> controller(CreateController());
+ base::scoped_nsobject<SadTabController> controller(CreateController());
HyperlinkTextView* help = GetHelpTextView(controller);
EXPECT_TRUE(help);
EXPECT_FALSE(link_clicked_);
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h
index b203cb2..45fdf7e 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_
#define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_SAD_TAB_VIEW_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/cocoa/base_view.h"
#import <Cocoa/Cocoa.h>
@@ -21,14 +21,14 @@
IBOutlet NSTextField* message_;
IBOutlet NSTextField* helpPlaceholder_;
- scoped_nsobject<NSColor> backgroundColor_;
+ base::scoped_nsobject<NSColor> backgroundColor_;
NSSize messageSize_;
// Text fields don't work as well with embedded links as text views, but
// text views cannot conveniently be created in IB. The xib file contains
// a text field |helpPlaceholder_| that's replaced by this text view |help_|
// in -awakeFromNib.
- scoped_nsobject<HyperlinkTextView> help_;
+ base::scoped_nsobject<HyperlinkTextView> help_;
// A weak reference to the parent controller.
IBOutlet SadTabController* controller_;
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_unittest.mm
index 76808cf..82bf73a 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view_unittest.mm
@@ -11,8 +11,8 @@ class SadTabViewTest : public CocoaTest {
public:
SadTabViewTest() {
NSRect content_frame = [[test_window() contentView] frame];
- scoped_nsobject<SadTabView> view([[SadTabView alloc]
- initWithFrame:content_frame]);
+ base::scoped_nsobject<SadTabView> view(
+ [[SadTabView alloc] initWithFrame:content_frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 51d4c5b..5d54f76 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -6,7 +6,7 @@
#include <utility>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/devtools/devtools_window.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
@@ -32,7 +32,7 @@ using content::WebContents;
}
- (void)loadView {
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
[view setAutoresizingMask:NSViewHeightSizable|NSViewWidthSizable];
[self setView:view];
}
diff --git a/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h b/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h
index 6a88203..0ead38a 100644
--- a/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h
+++ b/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h
@@ -47,8 +47,8 @@ class TabModalConfirmDialogMac : public TabModalConfirmDialog,
scoped_ptr<ConstrainedWindowMac> window_;
scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
- scoped_nsobject<ConstrainedWindowAlert> alert_;
- scoped_nsobject<TabModalConfirmDialogMacBridge> bridge_;
+ base::scoped_nsobject<ConstrainedWindowAlert> alert_;
+ base::scoped_nsobject<TabModalConfirmDialogMacBridge> bridge_;
DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogMac);
};
diff --git a/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm b/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm
index ffc806f..e9b938e 100644
--- a/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser_dialogs.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
@@ -73,7 +73,7 @@ TabModalConfirmDialogMac::TabModalConfirmDialogMac(
[[alert_ closeButton] setAction:@selector(onCancelButton:)];
[alert_ layout];
- scoped_nsobject<CustomConstrainedWindowSheet> sheet(
+ base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[alert_ window]]);
window_.reset(new ConstrainedWindowMac(this, web_contents, sheet));
diff --git a/chrome/browser/ui/cocoa/table_row_nsimage_cache.h b/chrome/browser/ui/cocoa/table_row_nsimage_cache.h
index d0829fe..4932aa2 100644
--- a/chrome/browser/ui/cocoa/table_row_nsimage_cache.h
+++ b/chrome/browser/ui/cocoa/table_row_nsimage_cache.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace gfx {
class ImageSkia;
@@ -50,7 +50,7 @@ class TableRowNSImageCache {
// Stores strong NSImage refs for icons. If an entry is NULL, it will be
// created in GetImageForRow().
- scoped_nsobject<NSPointerArray> icon_images_;
+ base::scoped_nsobject<NSPointerArray> icon_images_;
};
#endif // CHROME_BROWSER_UI_COCOA_TABLE_ROW_NSIMAGE_CACHE_H_
diff --git a/chrome/browser/ui/cocoa/tabpose_window.h b/chrome/browser/ui/cocoa/tabpose_window.h
index 0e5a007..7651812 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.h
+++ b/chrome/browser/ui/cocoa/tabpose_window.h
@@ -9,7 +9,7 @@
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -61,10 +61,10 @@ class TabStripModelObserverBridge;
// Stores all preview layers. The order in here matches the order in
// the tabstrip model.
- scoped_nsobject<NSMutableArray> allThumbnailLayers_;
+ base::scoped_nsobject<NSMutableArray> allThumbnailLayers_;
- scoped_nsobject<NSMutableArray> allFaviconLayers_;
- scoped_nsobject<NSMutableArray> allTitleLayers_;
+ base::scoped_nsobject<NSMutableArray> allFaviconLayers_;
+ base::scoped_nsobject<NSMutableArray> allTitleLayers_;
// Manages the state of all layers.
scoped_ptr<tabpose::TileSet> tileSet_;
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index 3eb6cf2..1921489 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -976,10 +976,10 @@ void AnimateCALayerOpacityFromTo(
showZoom:(BOOL)showZoom
slomo:(BOOL)slomo
animationDelegate:(id)animationDelegate {
- scoped_nsobject<CALayer> layer([[ThumbnailLayer alloc]
- initWithWebContents:tile.web_contents()
- fullSize:tile.GetStartRectRelativeTo(
- tileSet_->selected_tile()).size]);
+ base::scoped_nsobject<CALayer> layer(
+ [[ThumbnailLayer alloc] initWithWebContents:tile.web_contents()
+ fullSize:tile.GetStartRectRelativeTo(
+ tileSet_->selected_tile()).size]);
[layer setNeedsDisplay];
NSTimeInterval interval =
@@ -1611,15 +1611,15 @@ void AnimateCALayerOpacityFromTo(
tileSet_->MoveTileFromTo(from, to);
// Move corresponding layers from |from| to |to|.
- scoped_nsobject<CALayer> thumbLayer(
+ base::scoped_nsobject<CALayer> thumbLayer(
[[allThumbnailLayers_ objectAtIndex:from] retain]);
[allThumbnailLayers_ removeObjectAtIndex:from];
[allThumbnailLayers_ insertObject:thumbLayer.get() atIndex:to];
- scoped_nsobject<CALayer> faviconLayer(
+ base::scoped_nsobject<CALayer> faviconLayer(
[[allFaviconLayers_ objectAtIndex:from] retain]);
[allFaviconLayers_ removeObjectAtIndex:from];
[allFaviconLayers_ insertObject:faviconLayer.get() atIndex:to];
- scoped_nsobject<CALayer> titleLayer(
+ base::scoped_nsobject<CALayer> titleLayer(
[[allTitleLayers_ objectAtIndex:from] retain]);
[allTitleLayers_ removeObjectAtIndex:from];
[allTitleLayers_ insertObject:titleLayer.get() atIndex:to];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h
index 4150bef..ca8a0d7 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
namespace content {
diff --git a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
index 478df04..a149d2a 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_audio_indicator_view_mac_unittest.mm
@@ -10,13 +10,13 @@
class TabAudioIndicatorViewMacTest : public CocoaTest {
protected:
TabAudioIndicatorViewMacTest() {
- scoped_nsobject<TabAudioIndicatorViewMac> view(
+ base::scoped_nsobject<TabAudioIndicatorViewMac> view(
[[TabAudioIndicatorViewMac alloc]
initWithFrame:NSMakeRect(0, 0, 16, 16)]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithSize:NSMakeSize(16, 16)]);
[image lockFocus];
NSRectFill(NSMakeRect(0, 0, 16, 16));
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.h b/chrome/browser/ui/cocoa/tabs/tab_controller.h
index d75d8d6..93cdbe4 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.h
@@ -40,9 +40,9 @@ class MenuDelegate;
@interface TabController : NSViewController<TabDraggingEventTarget> {
@private
- scoped_nsobject<NSView> iconView_;
- scoped_nsobject<NSTextField> titleView_;
- scoped_nsobject<HoverCloseButton> closeButton_;
+ base::scoped_nsobject<NSView> iconView_;
+ base::scoped_nsobject<NSTextField> titleView_;
+ base::scoped_nsobject<HoverCloseButton> closeButton_;
NSRect originalIconFrame_; // frame of iconView_ as loaded from nib
BOOL isIconShowing_; // last state of iconView_ in updateVisibility
@@ -60,7 +60,7 @@ class MenuDelegate;
SEL action_; // selector sent when tab is selected by clicking
scoped_ptr<ui::SimpleMenuModel> contextMenuModel_;
scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_;
- scoped_nsobject<MenuController> contextMenuController_;
+ base::scoped_nsobject<MenuController> contextMenuController_;
}
@property(assign, nonatomic) TabLoadingState loadingState;
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index 3e7924c..1006ef0 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -102,7 +102,7 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
// Label.
titleView_.reset([[NSTextField alloc] initWithFrame:titleFrame]);
[titleView_ setAutoresizingMask:NSViewWidthSizable];
- scoped_nsobject<GTMFadeTruncatingTextFieldCell> labelCell(
+ base::scoped_nsobject<GTMFadeTruncatingTextFieldCell> labelCell(
[[GTMFadeTruncatingTextFieldCell alloc] initTextCell:@"Label"]);
[labelCell setControlSize:NSSmallControlSize];
CGFloat fontSize = [NSFont systemFontSizeForControlSize:NSSmallControlSize];
@@ -118,8 +118,10 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
[closeButton_ setTarget:self];
[closeButton_ setAction:@selector(closeTab:)];
- scoped_nsobject<TabView> view([[TabView alloc] initWithFrame:
- NSMakeRect(0, 0, 160, 25) controller:self closeButton:closeButton_]);
+ base::scoped_nsobject<TabView> view(
+ [[TabView alloc] initWithFrame:NSMakeRect(0, 0, 160, 25)
+ controller:self
+ closeButton:closeButton_]);
[view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
[view addSubview:iconView_];
[view addSubview:titleView_];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
index f039c3b..ad24ca7 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
@@ -20,7 +20,7 @@
@private
bool selected_;
bool closed_;
- scoped_nsobject<TabStripDragController> dragController_;
+ base::scoped_nsobject<TabStripDragController> dragController_;
}
- (bool)selected;
- (bool)closed;
@@ -101,7 +101,7 @@ class TabControllerTest : public CocoaTest {
// Tests creating the controller, sticking it in a window, and removing it.
TEST_F(TabControllerTest, Creation) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
EXPECT_TRUE([controller tabView]);
EXPECT_EQ([[controller view] window], window);
@@ -113,10 +113,10 @@ TEST_F(TabControllerTest, Creation) {
// called. Mimics the user clicking on the close button in the tab.
TEST_F(TabControllerTest, Close) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
- scoped_nsobject<TabControllerTestTarget> target(
+ base::scoped_nsobject<TabControllerTestTarget> target(
[[TabControllerTestTarget alloc] init]);
EXPECT_FALSE([target closed]);
[controller setTarget:target];
@@ -131,7 +131,7 @@ TEST_F(TabControllerTest, Close) {
// Tests setting the |selected| property via code.
TEST_F(TabControllerTest, APISelection) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
EXPECT_FALSE([controller selected]);
@@ -145,7 +145,7 @@ TEST_F(TabControllerTest, APISelection) {
TEST_F(TabControllerTest, ToolTip) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
EXPECT_TRUE([[controller toolTip] length] == 0);
@@ -157,7 +157,7 @@ TEST_F(TabControllerTest, ToolTip) {
// Tests setting the |loading| property via code.
TEST_F(TabControllerTest, Loading) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
EXPECT_EQ(kTabDone, [controller loadingState]);
@@ -178,7 +178,7 @@ TEST_F(TabControllerTest, UserSelection) {
// Create a tab at a known location in the window that we can click on
// to activate selection.
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
NSRect frame = [[controller view] frame];
frame.size.width = [TabController minTabWidth];
@@ -186,7 +186,7 @@ TEST_F(TabControllerTest, UserSelection) {
[[controller view] setFrame:frame];
// Set the target and action.
- scoped_nsobject<TabControllerTestTarget> target(
+ base::scoped_nsobject<TabControllerTestTarget> target(
[[TabControllerTestTarget alloc] init]);
EXPECT_FALSE([target selected]);
[controller setTarget:target];
@@ -224,7 +224,7 @@ TEST_F(TabControllerTest, UserSelection) {
TEST_F(TabControllerTest, IconCapacity) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
int cap = [controller iconCapacity];
EXPECT_GE(cap, 1);
@@ -238,7 +238,7 @@ TEST_F(TabControllerTest, IconCapacity) {
TEST_F(TabControllerTest, ShouldShowIcon) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
int cap = [controller iconCapacity];
EXPECT_GT(cap, 0);
@@ -251,7 +251,7 @@ TEST_F(TabControllerTest, ShouldShowIcon) {
EXPECT_FALSE([controller shouldShowCloseButton]);
// Setting the icon when tab is at min width should not show icon (bug 18359).
- scoped_nsobject<NSView> newIcon(
+ base::scoped_nsobject<NSView> newIcon(
[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 16, 16)]);
[controller setIconView:newIcon.get()];
EXPECT_TRUE([newIcon isHidden]);
@@ -283,8 +283,8 @@ TEST_F(TabControllerTest, ShouldShowIcon) {
TEST_F(TabControllerTest, Menu) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
- scoped_nsobject<TabControllerTestTarget> target(
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabControllerTestTarget> target(
[[TabControllerTestTarget alloc] init]);
[controller setTarget:target];
@@ -303,7 +303,7 @@ TEST_F(TabControllerTest, Menu) {
TEST_F(TabControllerTest, TitleViewLayout) {
NSWindow* window = test_window();
- scoped_nsobject<TabController> controller([[TabController alloc] init]);
+ base::scoped_nsobject<TabController> controller([[TabController alloc] init]);
[[window contentView] addSubview:[controller view]];
NSRect tabFrame = [[controller view] frame];
tabFrame.size.width = [TabController maxTabWidth];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h
index 9b07b5b..7f74b16 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/cocoa/tabs/throbbing_image_view.h"
@@ -16,7 +16,7 @@
// animated glow. This view paints outside the favicon bounds due to the glow.
@interface TabProjectingImageView : ThrobbingImageView {
@private
- scoped_nsobject<NSImage> projectorImage_;
+ base::scoped_nsobject<NSImage> projectorImage_;
}
- (id)initWithFrame:(NSRect)rect
diff --git a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
index 25bc7dd..ab10080 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm
@@ -14,31 +14,31 @@ namespace {
class TabProjectingImageViewTest : public CocoaTest {
public:
TabProjectingImageViewTest() {
- scoped_nsobject<NSImage> backgroundImage(
+ base::scoped_nsobject<NSImage> backgroundImage(
[[NSImage alloc] initWithSize:NSMakeSize(16, 16)]);
[backgroundImage lockFocus];
NSRectFill(NSMakeRect(0, 0, 16, 16));
[backgroundImage unlockFocus];
- scoped_nsobject<NSImage> projectorImage(
+ base::scoped_nsobject<NSImage> projectorImage(
[[NSImage alloc] initWithSize:NSMakeSize(16, 16)]);
[projectorImage lockFocus];
NSRectFill(NSMakeRect(0, 0, 16, 16));
[projectorImage unlockFocus];
- scoped_nsobject<NSImage> throbImage(
+ base::scoped_nsobject<NSImage> throbImage(
[[NSImage alloc] initWithSize:NSMakeSize(32, 32)]);
[throbImage lockFocus];
NSRectFill(NSMakeRect(0, 0, 32, 32));
[throbImage unlockFocus];
- scoped_nsobject<TabProjectingImageView> view([[TabProjectingImageView alloc]
- initWithFrame:NSMakeRect(0, 0, 32, 32)
- backgroundImage:backgroundImage
- projectorImage:projectorImage
- throbImage:throbImage
- durationMS:20
- animationContainer:NULL]);
+ base::scoped_nsobject<TabProjectingImageView> view(
+ [[TabProjectingImageView alloc] initWithFrame:NSMakeRect(0, 0, 32, 32)
+ backgroundImage:backgroundImage
+ projectorImage:projectorImage
+ throbImage:throbImage
+ durationMS:20
+ animationContainer:NULL]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h
index dc5e357..216ff3b 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
#import "chrome/browser/ui/cocoa/url_drop_target.h"
@@ -61,16 +61,17 @@ class AnimationContainer;
NSObject<TabControllerTarget,
URLDropTargetController> {
@private
- scoped_nsobject<TabStripView> tabStripView_;
+ base::scoped_nsobject<TabStripView> tabStripView_;
NSView* switchView_; // weak
- scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags
+ base::scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server
+ // drags
NewTabButton* newTabButton_; // weak, obtained from the nib.
// The controller that manages all the interactions of dragging tabs.
- scoped_nsobject<TabStripDragController> dragController_;
+ base::scoped_nsobject<TabStripDragController> dragController_;
// Tracks the newTabButton_ for rollovers.
- scoped_nsobject<CrTrackingArea> newTabTrackingArea_;
+ base::scoped_nsobject<CrTrackingArea> newTabTrackingArea_;
scoped_ptr<TabStripModelObserverBridge> bridge_;
Browser* browser_; // weak
TabStripModel* tabStripModel_; // weak
@@ -89,14 +90,14 @@ class AnimationContainer;
// tabs are animating closed (closed tabs are removed from |tabStripModel_|
// immediately, but from |tabContentsArray_| only after their close animation
// has completed).
- scoped_nsobject<NSMutableArray> tabContentsArray_;
+ base::scoped_nsobject<NSMutableArray> tabContentsArray_;
// An array of TabControllers which manage the actual tab views. See note
// above |tabContentsArray_|. |tabContentsArray_| and |tabArray_| always
// contain objects belonging to the same tabs at the same indices.
- scoped_nsobject<NSMutableArray> tabArray_;
+ base::scoped_nsobject<NSMutableArray> tabArray_;
// Set of TabControllers that are currently animating closed.
- scoped_nsobject<NSMutableSet> closingControllers_;
+ base::scoped_nsobject<NSMutableSet> closingControllers_;
// These values are only used during a drag, and override tab positioning.
TabView* placeholderTab_; // weak. Tab being dragged
@@ -105,7 +106,7 @@ class AnimationContainer;
// Frame targets for all the current views.
// target frames are used because repeated requests to [NSView animator].
// aren't coalesced, so we store frames to avoid redundant calls.
- scoped_nsobject<NSMutableDictionary> targetFrames_;
+ base::scoped_nsobject<NSMutableDictionary> targetFrames_;
NSRect newTabTargetFrame_;
// If YES, do not show the new tab button during layout.
BOOL forceNewTabButtonHidden_;
@@ -121,15 +122,15 @@ class AnimationContainer;
float availableResizeWidth_;
// A tracking area that's the size of the tab strip used to be notified
// when the mouse moves in the tab strip
- scoped_nsobject<CrTrackingArea> trackingArea_;
+ base::scoped_nsobject<CrTrackingArea> trackingArea_;
TabView* hoveredTab_; // weak. Tab that the mouse is hovering over
// Array of subviews which are permanent (and which should never be removed),
// such as the new-tab button, but *not* the tabs themselves.
- scoped_nsobject<NSMutableArray> permanentSubviews_;
+ base::scoped_nsobject<NSMutableArray> permanentSubviews_;
// The default favicon, so we can use one copy for all buttons.
- scoped_nsobject<NSImage> defaultFavicon_;
+ base::scoped_nsobject<NSImage> defaultFavicon_;
// The amount by which to indent the tabs on the sides (to make room for the
// red/yellow/green and incognito/fullscreen buttons).
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index de91256..cdd9b2a 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -162,7 +162,7 @@ private:
// 10.6 and 10.7.
NSImage* CreateImageWithSize(NSSize size,
void (^drawingHandler)(NSSize)) {
- scoped_nsobject<NSImage> result([[NSImage alloc] initWithSize:size]);
+ base::scoped_nsobject<NSImage> result([[NSImage alloc] initWithSize:size]);
[NSGraphicsContext saveGraphicsState];
for (ui::ScaleFactor scale_factor : ui::GetSupportedScaleFactors()) {
float scale = GetScaleFactorScale(scale_factor);
@@ -1296,7 +1296,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Make a new tab. Load the contents of this tab from the nib and associate
// the new controller with |contents| so it can be looked up later.
- scoped_nsobject<TabContentsController> contentsController(
+ base::scoped_nsobject<TabContentsController> contentsController(
[[TabContentsController alloc] initWithContents:contents]);
[tabContentsArray_ insertObject:contentsController atIndex:index];
@@ -1410,7 +1410,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Simply create a new TabContentsController for |newContents| and place it
// into the array, replacing |oldContents|. An ActiveTabChanged notification
// will follow, at which point we will install the new view.
- scoped_nsobject<TabContentsController> newController(
+ base::scoped_nsobject<TabContentsController> newController(
[[TabContentsController alloc] initWithContents:newContents]);
// Bye bye, |oldController|.
@@ -1491,9 +1491,9 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
NSView* tabView = [closingTab view];
CAAnimation* animation = [[tabView animationForKey:@"frameOrigin"] copy];
[animation autorelease];
- scoped_nsobject<TabCloseAnimationDelegate> delegate(
- [[TabCloseAnimationDelegate alloc] initWithTabStrip:self
- tabController:closingTab]);
+ base::scoped_nsobject<TabCloseAnimationDelegate> delegate(
+ [[TabCloseAnimationDelegate alloc] initWithTabStrip:self
+ tabController:closingTab]);
[animation setDelegate:delegate.get()]; // Retains delegate.
NSMutableDictionary* animationDictionary =
[NSMutableDictionary dictionaryWithDictionary:[tabView animations]];
@@ -1746,12 +1746,12 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
// Cancel any pending tab transition.
hoverTabSelector_->CancelTabTransition();
- scoped_nsobject<TabContentsController> movedTabContentsController(
+ base::scoped_nsobject<TabContentsController> movedTabContentsController(
[[tabContentsArray_ objectAtIndex:from] retain]);
[tabContentsArray_ removeObjectAtIndex:from];
[tabContentsArray_ insertObject:movedTabContentsController.get()
atIndex:to];
- scoped_nsobject<TabController> movedTabController(
+ base::scoped_nsobject<TabController> movedTabController(
[[tabArray_ objectAtIndex:from] retain]);
DCHECK([movedTabController isKindOfClass:[TabController class]]);
[tabArray_ removeObjectAtIndex:from];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
index 025caae..cf230d1 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
@@ -93,7 +93,7 @@ class TabStripControllerTest : public CocoaProfileTest {
// Create the "switch view" (view that gets changed out when a tab
// switches).
NSRect switch_frame = NSMakeRect(0, 0, content_frame.size.width, 500);
- scoped_nsobject<NSView> switch_view(
+ base::scoped_nsobject<NSView> switch_view(
[[NSView alloc] initWithFrame:switch_frame]);
[parent addSubview:switch_view.get()];
@@ -105,7 +105,7 @@ class TabStripControllerTest : public CocoaProfileTest {
[[TabStripView alloc] initWithFrame:strip_frame]);
[parent addSubview:tab_strip_.get()];
NSRect button_frame = NSMakeRect(0, 0, 15, 15);
- scoped_nsobject<NewTabButton> new_tab_button(
+ base::scoped_nsobject<NewTabButton> new_tab_button(
[[NewTabButton alloc] initWithFrame:button_frame]);
[tab_strip_ addSubview:new_tab_button.get()];
[tab_strip_ setNewTabButton:new_tab_button.get()];
@@ -152,9 +152,9 @@ class TabStripControllerTest : public CocoaProfileTest {
scoped_ptr<TestTabStripModelDelegate> delegate_;
TabStripModel* model_;
- scoped_nsobject<TestTabStripControllerDelegate> controller_delegate_;
- scoped_nsobject<TabStripController> controller_;
- scoped_nsobject<TabStripView> tab_strip_;
+ base::scoped_nsobject<TestTabStripControllerDelegate> controller_delegate_;
+ base::scoped_nsobject<TabStripController> controller_;
+ base::scoped_nsobject<TabStripView> tab_strip_;
};
// Test adding and removing tabs and making sure that views get added to
@@ -240,10 +240,9 @@ TEST_F(TabStripControllerTest, TabCloseDuringDrag) {
// Schedule a task to close all the tabs and stop the drag, before the call to
// -maybeStartDrag:forTab:, which starts a nested event loop. This task will
// run in that nested event loop, which shouldn't crash.
- scoped_nsobject<TestClosureRunner> runner(
- [[TestClosureRunner alloc] initWithClosure:
- base::Bind(&TabStripControllerTest::CloseTabsAndEndDrag,
- base::Unretained(this))]);
+ base::scoped_nsobject<TestClosureRunner> runner([[TestClosureRunner alloc]
+ initWithClosure:base::Bind(&TabStripControllerTest::CloseTabsAndEndDrag,
+ base::Unretained(this))]);
[runner scheduleDelayedRun];
NSEvent* event =
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
index 2a338bb..e24351a 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
@@ -108,8 +108,8 @@ const NSTimeInterval kTearDuration = 0.333;
// When spinning the event loop, a tab can get detached, which could lead to
// our own destruction. Keep ourselves around while spinning the loop as well
// as the tab controller being dragged.
- scoped_nsobject<TabStripDragController> keepAlive([self retain]);
- scoped_nsobject<TabController> keepAliveTab([tab retain]);
+ base::scoped_nsobject<TabStripDragController> keepAlive([self retain]);
+ base::scoped_nsobject<TabController> keepAliveTab([tab retain]);
// Because we move views between windows, we need to handle the event loop
// ourselves. Ideally we should use the standard event loop.
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_view.h b/chrome/browser/ui/cocoa/tabs/tab_strip_view.h
index 1cb4ba2..d2c1c36 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/url_drop_target.h"
@class NewTabButton;
@@ -23,9 +23,9 @@
NSTimeInterval lastMouseUp_;
// Handles being a drag-and-drop target.
- scoped_nsobject<URLDropTargetHandler> dropHandler_;
+ base::scoped_nsobject<URLDropTargetHandler> dropHandler_;
- scoped_nsobject<NewTabButton> newTabButton_;
+ base::scoped_nsobject<NewTabButton> newTabButton_;
// Whether the drop-indicator arrow is shown, and if it is, the coordinate of
// its tip.
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_view_unittest.mm
index d7961aa..ed816bf 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -16,7 +16,7 @@ class TabStripViewTest : public CocoaTest {
public:
TabStripViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- scoped_nsobject<TabStripView> view(
+ base::scoped_nsobject<TabStripView> view(
[[TabStripView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.h b/chrome/browser/ui/cocoa/tabs/tab_view.h
index 69d68d9..f5c3177 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.h
@@ -5,11 +5,11 @@
#ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_
#define CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_
-#import <Cocoa/Cocoa.h>
#include <ApplicationServices/ApplicationServices.h>
+#import <Cocoa/Cocoa.h>
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/hover_close_button.h"
namespace tabs {
@@ -70,7 +70,7 @@ const CGFloat kImageNoFocusAlpha = 0.65;
NSCellStateValue state_;
// The tool tip text for this tab view.
- scoped_nsobject<NSString> toolTipText_;
+ base::scoped_nsobject<NSString> toolTipText_;
// A one-element mask image cache. This cache makes drawing roughly 16%
// faster.
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index 443f86b..cda5b8e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -211,7 +211,7 @@ const CGFloat kRapidCloseDist = 2.5;
// strip and then deallocated. This will also result in *us* being
// deallocated. Both these are bad, so we prevent this by retaining the
// controller.
- scoped_nsobject<TabController> controller([controller_ retain]);
+ base::scoped_nsobject<TabController> controller([controller_ retain]);
// Try to initiate a drag. This will spin a custom event loop and may
// dispatch other mouse events.
@@ -379,7 +379,7 @@ const CGFloat kRapidCloseDist = 2.5;
// Draw a mouse hover gradient for the default themes.
if (!selected && hoverAlpha > 0) {
if (themeProvider && !hasCustomTheme) {
- scoped_nsobject<NSGradient> glow([NSGradient alloc]);
+ base::scoped_nsobject<NSGradient> glow([NSGradient alloc]);
[glow initWithStartingColor:[NSColor colorWithCalibratedWhite:1.0
alpha:1.0 * hoverAlpha]
endingColor:[NSColor colorWithCalibratedWhite:1.0
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/tab_view_unittest.mm
index e5f6c12..ccc1216 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/tabs/tab_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -19,7 +19,7 @@ class TabViewTest : public CocoaTest {
public:
TabViewTest() {
NSRect frame = NSMakeRect(0, 0, kTabWidth, kTabHeight);
- scoped_nsobject<TabView> view([[TabView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<TabView> view([[TabView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.h b/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
index 4242c2d..70693ff 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
@@ -14,7 +14,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@class FastResizeView;
@class FocusTracker;
@@ -23,8 +23,8 @@
@interface TabWindowController : NSWindowController<NSWindowDelegate> {
@private
- scoped_nsobject<FastResizeView> tabContentArea_;
- scoped_nsobject<TabStripView> tabStripView_;
+ base::scoped_nsobject<FastResizeView> tabContentArea_;
+ base::scoped_nsobject<TabStripView> tabStripView_;
// The child window used during dragging to achieve the opacity tricks.
NSWindow* overlayWindow_;
@@ -33,7 +33,7 @@
// of the drag) to the |overlayWindow_|.
NSView* originalContentView_; // weak
- scoped_nsobject<FocusTracker> focusBeforeOverlay_;
+ base::scoped_nsobject<FocusTracker> focusBeforeOverlay_;
BOOL closeDeferred_; // If YES, call performClose: in removeOverlay:.
}
@property(readonly, nonatomic) TabStripView* tabStripView;
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
index fa7a5e7..e49c875 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
@@ -45,7 +45,7 @@
- (id)initTabWindowControllerWithTabStrip:(BOOL)hasTabStrip {
NSRect contentRect = NSMakeRect(60, 229, 750, 600);
- scoped_nsobject<FramedBrowserWindow> window(
+ base::scoped_nsobject<FramedBrowserWindow> window(
[[FramedBrowserWindow alloc] initWithContentRect:contentRect
hasTabStrip:hasTabStrip]);
[window setReleasedWhenClosed:YES];
diff --git a/chrome/browser/ui/cocoa/tabs/throbber_view.h b/chrome/browser/ui/cocoa/tabs/throbber_view.h
index 6e90ec0..4e124f9 100644
--- a/chrome/browser/ui/cocoa/tabs/throbber_view.h
+++ b/chrome/browser/ui/cocoa/tabs/throbber_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@protocol ThrobberDataDelegate;
diff --git a/chrome/browser/ui/cocoa/tabs/throbber_view.mm b/chrome/browser/ui/cocoa/tabs/throbber_view.mm
index 29cc6df..6abc29a 100644
--- a/chrome/browser/ui/cocoa/tabs/throbber_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/throbber_view.mm
@@ -29,7 +29,7 @@ static const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
@interface ThrobberFilmstripDelegate : NSObject
<ThrobberDataDelegate> {
- scoped_nsobject<NSImage> image_;
+ base::scoped_nsobject<NSImage> image_;
unsigned int numFrames_; // Number of frames in this animation.
unsigned int animationFrame_; // Current frame of the animation,
// [0..numFrames_)
@@ -83,8 +83,8 @@ static const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
@interface ThrobberToastDelegate : NSObject
<ThrobberDataDelegate> {
- scoped_nsobject<NSImage> image1_;
- scoped_nsobject<NSImage> image2_;
+ base::scoped_nsobject<NSImage> image1_;
+ base::scoped_nsobject<NSImage> image2_;
NSSize image1Size_;
NSSize image2Size_;
int animationFrame_; // Current frame of the animation,
diff --git a/chrome/browser/ui/cocoa/tabs/throbber_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/throbber_view_unittest.mm
index de7f295..22e72cc 100644
--- a/chrome/browser/ui/cocoa/tabs/throbber_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/throbber_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/tabs/throbber_view.h"
#include "grit/ui_resources.h"
diff --git a/chrome/browser/ui/cocoa/tabs/throbbing_image_view.h b/chrome/browser/ui/cocoa/tabs/throbbing_image_view.h
index 1cd8d60..4cf9486 100644
--- a/chrome/browser/ui/cocoa/tabs/throbbing_image_view.h
+++ b/chrome/browser/ui/cocoa/tabs/throbbing_image_view.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/animation/throb_animation.h"
@@ -23,8 +23,8 @@ enum ThrobPosition {
@interface ThrobbingImageView : NSView {
@protected
- scoped_nsobject<NSImage> backgroundImage_;
- scoped_nsobject<NSImage> throbImage_;
+ base::scoped_nsobject<NSImage> backgroundImage_;
+ base::scoped_nsobject<NSImage> throbImage_;
scoped_ptr<ui::ThrobAnimation> throbAnimation_;
@private
diff --git a/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm b/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
index 33f7f41..703d97b 100644
--- a/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/tabs/throbbing_image_view_unittest.mm
@@ -14,19 +14,19 @@ namespace {
class ThrobbingImageViewTest : public CocoaTest {
public:
ThrobbingImageViewTest() {
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithSize:NSMakeSize(16, 16)]);
[image lockFocus];
NSRectFill(NSMakeRect(0, 0, 16, 16));
[image unlockFocus];
- scoped_nsobject<ThrobbingImageView> view([[ThrobbingImageView alloc]
- initWithFrame:NSMakeRect(0, 0, 16, 16)
- backgroundImage:image
- throbImage:image
- durationMS:20
- throbPosition:kThrobPositionOverlay
- animationContainer:NULL]);
+ base::scoped_nsobject<ThrobbingImageView> view(
+ [[ThrobbingImageView alloc] initWithFrame:NSMakeRect(0, 0, 16, 16)
+ backgroundImage:image
+ throbImage:image
+ durationMS:20
+ throbPosition:kThrobPositionOverlay
+ animationContainer:NULL]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.h b/chrome/browser/ui/cocoa/task_manager_mac.h
index 6e804b9..093f9f4 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.h
+++ b/chrome/browser/ui/cocoa/task_manager_mac.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/ui/cocoa/table_row_nsimage_cache.h"
@@ -31,7 +31,7 @@ class ImageSkia;
TaskManager* taskManager_; // weak
TaskManagerModel* model_; // weak
- scoped_nsobject<WindowSizeAutosaver> size_saver_;
+ base::scoped_nsobject<WindowSizeAutosaver> size_saver_;
// These contain a permutation of [0..|model_->ResourceCount() - 1|]. Used to
// implement sorting.
@@ -39,7 +39,7 @@ class ImageSkia;
std::vector<int> modelToViewMap_;
// Descriptor of the current sort column.
- scoped_nsobject<NSSortDescriptor> currentSortDescriptor_;
+ base::scoped_nsobject<NSSortDescriptor> currentSortDescriptor_;
}
// Creates and shows the task manager's window.
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm
index 62fe460..a75e706 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac.mm
@@ -216,7 +216,7 @@ class SortHelper {
// Adds a column which has the given string id as title. |isVisible| specifies
// if the column is initially visible.
- (NSTableColumn*)addColumnWithId:(int)columnId visible:(BOOL)isVisible {
- scoped_nsobject<NSTableColumn> column([[NSTableColumn alloc]
+ base::scoped_nsobject<NSTableColumn> column([[NSTableColumn alloc]
initWithIdentifier:[NSString stringWithFormat:@"%d", columnId]]);
NSTextAlignment textAlignment =
@@ -238,9 +238,10 @@ class SortHelper {
// The page column should by default be sorted ascending.
BOOL ascending = columnId == IDS_TASK_MANAGER_TASK_COLUMN;
- scoped_nsobject<NSSortDescriptor> sortDescriptor([[NSSortDescriptor alloc]
- initWithKey:[NSString stringWithFormat:@"%d", columnId]
- ascending:ascending]);
+ base::scoped_nsobject<NSSortDescriptor> sortDescriptor(
+ [[NSSortDescriptor alloc]
+ initWithKey:[NSString stringWithFormat:@"%d", columnId]
+ ascending:ascending]);
[column.get() setSortDescriptorPrototype:sortDescriptor.get()];
// Default values, only used in release builds if nobody notices the DCHECK
@@ -275,7 +276,7 @@ class SortHelper {
visible:YES];
// |nameColumn| displays an icon for every row -- this is done by an
// NSButtonCell.
- scoped_nsobject<NSButtonCell> nameCell(
+ base::scoped_nsobject<NSButtonCell> nameCell(
[[NSButtonCell alloc] initTextCell:@""]);
[nameCell.get() setImagePosition:NSImageLeft];
[nameCell.get() setButtonType:NSSwitchButton];
@@ -310,7 +311,7 @@ class SortHelper {
// which columns should be shown and which should be hidden (like e.g.
// Task Manager.app's table header context menu).
- (void)setUpTableHeaderContextMenu {
- scoped_nsobject<NSMenu> contextMenu(
+ base::scoped_nsobject<NSMenu> contextMenu(
[[NSMenu alloc] initWithTitle:@"Task Manager context menu"]);
for (NSTableColumn* column in [tableView_ tableColumns]) {
NSMenuItem* item = [contextMenu.get()
diff --git a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
index b849012..bda53cc 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/task_manager/resource_provider.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
diff --git a/chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h b/chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h
index 282ff77..e186341 100644
--- a/chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h
+++ b/chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
@@ -27,7 +27,7 @@ const BackForwardMenuType BACK_FORWARD_MENU_TYPE_FORWARD =
BackForwardMenuType type_;
MenuButton* button_; // Weak; comes from nib.
scoped_ptr<BackForwardMenuModel> model_;
- scoped_nsobject<NSMenu> backForwardMenu_;
+ base::scoped_nsobject<NSMenu> backForwardMenu_;
}
// Type (back or forwards); can only be set on initialization.
diff --git a/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm b/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
index c7eccd9..b8079c9 100644
--- a/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
@@ -6,7 +6,7 @@
#import "chrome/browser/ui/cocoa/toolbar/reload_button.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
@@ -29,7 +29,7 @@ class ReloadButtonTest : public CocoaTest {
public:
ReloadButtonTest() {
NSRect frame = NSMakeRect(0, 0, 20, 20);
- scoped_nsobject<ReloadButton> button(
+ base::scoped_nsobject<ReloadButton> button(
[[ReloadButton alloc] initWithFrame:frame]);
button_ = button.get();
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_button_unittest.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_button_unittest.mm
index 3ebbefc..48a7dd3 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_button_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_button.h"
@@ -54,7 +54,7 @@ class ToolbarButtonTest : public CocoaTest {
public:
ToolbarButtonTest() {
NSRect frame = NSMakeRect(0, 0, 20, 20);
- scoped_nsobject<TestableToolbarButton> button(
+ base::scoped_nsobject<TestableToolbarButton> button(
[[TestableToolbarButton alloc] initWithFrame:frame]);
button_ = button.get();
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h
index 6fdbd58..07a0bf5 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_member.h"
#import "chrome/browser/ui/cocoa/command_observer_bridge.h"
@@ -64,14 +64,15 @@ class NotificationBridge;
Browser* browser_; // weak, one per window
scoped_ptr<CommandObserverBridge> commandObserver_;
scoped_ptr<LocationBarViewMac> locationBarView_;
- scoped_nsobject<AutocompleteTextFieldEditor> autocompleteTextFieldEditor_;
+ base::scoped_nsobject<AutocompleteTextFieldEditor>
+ autocompleteTextFieldEditor_;
id<ViewResizer> resizeDelegate_; // weak
- scoped_nsobject<BackForwardMenuController> backMenuController_;
- scoped_nsobject<BackForwardMenuController> forwardMenuController_;
- scoped_nsobject<BrowserActionsController> browserActionsController_;
+ base::scoped_nsobject<BackForwardMenuController> backMenuController_;
+ base::scoped_nsobject<BackForwardMenuController> forwardMenuController_;
+ base::scoped_nsobject<BrowserActionsController> browserActionsController_;
// Lazily-instantiated menu controller.
- scoped_nsobject<WrenchMenuController> wrenchMenuController_;
+ base::scoped_nsobject<WrenchMenuController> wrenchMenuController_;
// Used for monitoring the optional toolbar button prefs.
scoped_ptr<ToolbarControllerInternal::NotificationBridge> notificationBridge_;
@@ -82,7 +83,7 @@ class NotificationBridge;
// We have an extra retain in the locationBar_.
// See comments in awakeFromNib for more info.
- scoped_nsobject<AutocompleteTextField> locationBarRetainer_;
+ base::scoped_nsobject<AutocompleteTextField> locationBarRetainer_;
// Tracking area for mouse enter/exit/moved in the toolbar.
ui::ScopedCrTrackingArea trackingArea_;
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm
index 7491229..8fb005e 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/prefs/pref_service.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/command_updater.h"
@@ -89,8 +89,8 @@ class ToolbarControllerTest : public CocoaProfileTest {
[[views objectAtIndex:kHomeIndex] isEnabled] ? true : false);
}
- scoped_nsobject<ViewResizerPong> resizeDelegate_;
- scoped_nsobject<ToolbarController> bar_;
+ base::scoped_nsobject<ViewResizerPong> resizeDelegate_;
+ base::scoped_nsobject<ToolbarController> bar_;
};
TEST_VIEW(ToolbarControllerTest, [bar_ view])
@@ -215,8 +215,8 @@ TEST_F(ToolbarControllerTest, BookmarkBubblePoint) {
}
TEST_F(ToolbarControllerTest, HoverButtonForEvent) {
- scoped_nsobject<HitView> view([[HitView alloc]
- initWithFrame:NSMakeRect(0,0,100,100)]);
+ base::scoped_nsobject<HitView> view(
+ [[HitView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]);
[bar_ setView:view];
NSEvent* event = [NSEvent mouseEventWithType:NSMouseMoved
location:NSMakePoint(10,10)
@@ -233,12 +233,13 @@ TEST_F(ToolbarControllerTest, HoverButtonForEvent) {
EXPECT_FALSE([bar_ hoverButtonForEvent:event]);
// Not yet...
- scoped_nsobject<NSButton> button([[NSButton alloc] init]);
+ base::scoped_nsobject<NSButton> button([[NSButton alloc] init]);
[view setHitTestReturn:button];
EXPECT_FALSE([bar_ hoverButtonForEvent:event]);
// Now!
- scoped_nsobject<GradientButtonCell> cell([[GradientButtonCell alloc] init]);
+ base::scoped_nsobject<GradientButtonCell> cell(
+ [[GradientButtonCell alloc] init]);
[button setCell:cell.get()];
EXPECT_TRUE([bar_ hoverButtonForEvent:nil]);
}
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_view_unittest.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_view_unittest.mm
index f6bb035..4bdeb56 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_view.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -16,7 +16,7 @@ class ToolbarViewTest : public CocoaTest {
// This class only needs to do one thing: prevent mouse down events from moving
// the parent window around.
TEST_F(ToolbarViewTest, CanDragWindow) {
- scoped_nsobject<ToolbarView> view([[ToolbarView alloc] init]);
+ base::scoped_nsobject<ToolbarView> view([[ToolbarView alloc] init]);
EXPECT_FALSE([view mouseDownCanMoveWindow]);
}
diff --git a/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm b/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
index 79ee865..416a500 100644
--- a/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm
@@ -21,14 +21,14 @@
class WrenchToolbarButtonCellTest : public CocoaTest {
protected:
WrenchToolbarButtonCellTest() {
- scoped_nsobject<NSButton> button([[TestWrenchToolbarButton alloc]
+ base::scoped_nsobject<NSButton> button([[TestWrenchToolbarButton alloc]
initWithFrame:NSMakeRect(0, 0, 29, 29)]);
button_ = button;
[[test_window() contentView] addSubview:button_];
}
NSButton* button_;
- scoped_nsobject<WrenchToolbarButtonCell> cell_;
+ base::scoped_nsobject<WrenchToolbarButtonCell> cell_;
base::MessageLoopForUI message_loop_; // Needed for ui::Animation.
private:
diff --git a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm
index 54cffda..362fd18 100644
--- a/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/validation_message_bubble_cocoa.mm
@@ -32,12 +32,12 @@ anchoredAt:(NSPoint)anchorPoint
mainText:(const string16&)mainText
subText:(const string16&)subText {
- scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
- initWithContentRect:
- NSMakeRect(0, 0, kWindowInitialWidth, kWindowInitialHeight)
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:NO]);
+ base::scoped_nsobject<InfoBubbleWindow> window(
+ [[InfoBubbleWindow alloc] initWithContentRect:
+ NSMakeRect(0, 0, kWindowInitialWidth, kWindowInitialHeight)
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO]);
if ((self = [super initWithWindow:window.get()
parentWindow:parentWindow
anchoredAt:anchorPoint])) {
@@ -66,7 +66,7 @@ anchoredAt:(NSPoint)anchorPoint
NSImage* image = ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(IDR_INPUT_ALERT).ToNSImage();
- scoped_nsobject<NSImageView> imageView([[NSImageView alloc]
+ base::scoped_nsobject<NSImageView> imageView([[NSImageView alloc]
initWithFrame:NSMakeRect(0, 0, image.size.width, image.size.height)]);
[imageView setImageFrameStyle:NSImageFrameNone];
[imageView setImage:image];
@@ -75,7 +75,7 @@ anchoredAt:(NSPoint)anchorPoint
const CGFloat textX = NSWidth([imageView frame]) + kIconTextMargin;
NSRect textFrame = NSMakeRect(textX, 0, NSWidth(contentFrame) - textX, 0);
- scoped_nsobject<NSTextField> text(
+ base::scoped_nsobject<NSTextField> text(
[[NSTextField alloc] initWithFrame:textFrame]);
[text setStringValue:base::SysUTF16ToNSString(mainText)];
[text setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
@@ -104,7 +104,7 @@ anchoredAt:(NSPoint)anchorPoint
NSRect subTextFrame = NSMakeRect(
textX, NSMaxY(textFrame) + kTextVerticalMargin,
NSWidth(textFrame), 0);
- scoped_nsobject<NSTextField> text2(
+ base::scoped_nsobject<NSTextField> text2(
[[NSTextField alloc] initWithFrame:subTextFrame]);
[text2 setStringValue:base::SysUTF16ToNSString(subText)];
[text2 setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
@@ -174,7 +174,7 @@ class ValidationMessageBubbleCocoa : public chrome::ValidationMessageBubble {
}
private:
- scoped_nsobject<ValidationMessageBubbleController> controller_;
+ base::scoped_nsobject<ValidationMessageBubbleController> controller_;
};
}
diff --git a/chrome/browser/ui/cocoa/validation_message_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/validation_message_bubble_controller_unittest.mm
index 207188b..594d379 100644
--- a/chrome/browser/ui/cocoa/validation_message_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/validation_message_bubble_controller_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/ui/cocoa/validation_message_bubble_controller.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/cocoa/vertical_gradient_view.h b/chrome/browser/ui/cocoa/vertical_gradient_view.h
index b42928d..c12301761 100644
--- a/chrome/browser/ui/cocoa/vertical_gradient_view.h
+++ b/chrome/browser/ui/cocoa/vertical_gradient_view.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_
#define CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import <Cocoa/Cocoa.h>
@@ -17,9 +17,9 @@
@interface VerticalGradientView : NSView {
@private
// The gradient to draw.
- scoped_nsobject<NSGradient> gradient_;
+ base::scoped_nsobject<NSGradient> gradient_;
// Color for bottom stroke.
- scoped_nsobject<NSColor> strokeColor_;
+ base::scoped_nsobject<NSColor> strokeColor_;
}
// Gets and sets the gradient to paint as background.
diff --git a/chrome/browser/ui/cocoa/vertical_gradient_view_unittest.mm b/chrome/browser/ui/cocoa/vertical_gradient_view_unittest.mm
index ac046b0..fa550b3 100644
--- a/chrome/browser/ui/cocoa/vertical_gradient_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/vertical_gradient_view_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/vertical_gradient_view.h"
@@ -12,7 +12,7 @@ class VerticalGradientViewTest : public CocoaTest {
public:
VerticalGradientViewTest() {
NSRect frame = NSMakeRect(0, 0, 50, 27);
- scoped_nsobject<VerticalGradientView> view(
+ base::scoped_nsobject<VerticalGradientView> view(
[[VerticalGradientView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
index 9797deb..4460de9 100644
--- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/web_dialog_window_controller.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/ui/browser_dialogs.h"
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
@@ -317,12 +317,12 @@ void WebDialogWindowDelegateBridge::HandleKeyboardEvent(
NSRect dialogRect = NSMakeRect(0, 0, dialogSize.width(), dialogSize.height());
NSUInteger style = NSTitledWindowMask | NSClosableWindowMask |
NSResizableWindowMask;
- scoped_nsobject<ChromeEventProcessingWindow> window(
+ base::scoped_nsobject<ChromeEventProcessingWindow> window(
[[ChromeEventProcessingWindow alloc]
- initWithContentRect:dialogRect
- styleMask:style
- backing:NSBackingStoreBuffered
- defer:YES]);
+ initWithContentRect:dialogRect
+ styleMask:style
+ backing:NSBackingStoreBuffered
+ defer:YES]);
if (!window.get()) {
return nil;
}
diff --git a/chrome/browser/ui/cocoa/website_settings_bubble_controller.h b/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
index 060496d..5f671e7 100644
--- a/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
#include "chrome/browser/ui/website_settings/website_settings_ui.h"
@@ -21,9 +21,9 @@ class WebContents;
@private
content::WebContents* webContents_;
- scoped_nsobject<NSView> contentView_;
- scoped_nsobject<NSSegmentedControl> segmentedControl_;
- scoped_nsobject<NSTabView> tabView_;
+ base::scoped_nsobject<NSView> contentView_;
+ base::scoped_nsobject<NSSegmentedControl> segmentedControl_;
+ base::scoped_nsobject<NSTabView> tabView_;
// Displays the web site identity.
NSTextField* identityField_;
diff --git a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
index 74e602c..b66584f 100644
--- a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
@@ -120,13 +120,13 @@ NSColor* IdentityVerifiedTextColor() {
@interface WebsiteSettingsTabSegmentedCell : NSSegmentedCell {
@private
- scoped_nsobject<NSImage> tabstripCenterImage_;
- scoped_nsobject<NSImage> tabstripLeftImage_;
- scoped_nsobject<NSImage> tabstripRightImage_;
+ base::scoped_nsobject<NSImage> tabstripCenterImage_;
+ base::scoped_nsobject<NSImage> tabstripLeftImage_;
+ base::scoped_nsobject<NSImage> tabstripRightImage_;
- scoped_nsobject<NSImage> tabCenterImage_;
- scoped_nsobject<NSImage> tabLeftImage_;
- scoped_nsobject<NSImage> tabRightImage_;
+ base::scoped_nsobject<NSImage> tabCenterImage_;
+ base::scoped_nsobject<NSImage> tabLeftImage_;
+ base::scoped_nsobject<NSImage> tabRightImage_;
// Key track of the index of segment which has keyboard focus. This is not
// the same as the currently selected segment.
@@ -303,7 +303,7 @@ NSColor* IdentityVerifiedTextColor() {
// Use an arbitrary height; it will be changed in performLayout.
NSRect contentRect = NSMakeRect(0, 0, [self defaultWindowWidth], 1);
// Create an empty window into which content is placed.
- scoped_nsobject<InfoBubbleWindow> window(
+ base::scoped_nsobject<InfoBubbleWindow> window(
[[InfoBubbleWindow alloc] initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -403,7 +403,7 @@ NSColor* IdentityVerifiedTextColor() {
// Create the tab view and its two tabs.
- scoped_nsobject<WebsiteSettingsTabSegmentedCell> cell(
+ base::scoped_nsobject<WebsiteSettingsTabSegmentedCell> cell(
[[WebsiteSettingsTabSegmentedCell alloc] init]);
CGFloat tabstripHeight = [cell cellSize].height;
NSRect tabstripFrame = NSMakeRect(
@@ -470,11 +470,11 @@ NSColor* IdentityVerifiedTextColor() {
// Create the contents of the Permissions tab and add it to the given tab view.
// Returns a weak reference to the tab view item's view.
- (NSView*)addPermissionsTabToTabView:(NSTabView*)tabView {
- scoped_nsobject<NSTabViewItem> item([[NSTabViewItem alloc] init]);
+ base::scoped_nsobject<NSTabViewItem> item([[NSTabViewItem alloc] init]);
[tabView_ insertTabViewItem:item.get()
atIndex:WebsiteSettingsUI::TAB_ID_PERMISSIONS];
- scoped_nsobject<NSView> contentView([[FlippedView alloc]
- initWithFrame:[tabView_ contentRect]]);
+ base::scoped_nsobject<NSView> contentView(
+ [[FlippedView alloc] initWithFrame:[tabView_ contentRect]]);
[contentView setAutoresizingMask:NSViewWidthSizable];
[item setView:contentView.get()];
@@ -531,9 +531,9 @@ NSColor* IdentityVerifiedTextColor() {
// Create the contents of the Connection tab and add it to the given tab view.
// Returns a weak reference to the tab view item's view.
- (NSView*)addConnectionTabToTabView:(NSTabView*)tabView {
- scoped_nsobject<NSTabViewItem> item([[NSTabViewItem alloc] init]);
- scoped_nsobject<NSView> contentView([[FlippedView alloc]
- initWithFrame:[tabView_ contentRect]]);
+ base::scoped_nsobject<NSTabViewItem> item([[NSTabViewItem alloc] init]);
+ base::scoped_nsobject<NSView> contentView(
+ [[FlippedView alloc] initWithFrame:[tabView_ contentRect]]);
[contentView setAutoresizingMask:NSViewWidthSizable];
// Place all the text and images at the same position. The positions will be
@@ -782,8 +782,8 @@ NSColor* IdentityVerifiedTextColor() {
// The height is arbitrary as it will be adjusted later.
CGFloat width = NSWidth([view frame]) - point.x - kFramePadding;
NSRect frame = NSMakeRect(point.x, point.y, width, 100);
- scoped_nsobject<NSTextField> textField(
- [[NSTextField alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSTextField> textField(
+ [[NSTextField alloc] initWithFrame:frame]);
[self configureTextFieldAsLabel:textField.get()];
[textField setStringValue:base::SysUTF16ToNSString(text)];
NSFont* font = bold ? [NSFont boldSystemFontOfSize:fontSize]
@@ -801,7 +801,7 @@ NSColor* IdentityVerifiedTextColor() {
toView:(NSView*)view
atPoint:(NSPoint)point {
NSRect frame = NSMakeRect(point.x, point.y, size.width, size.height);
- scoped_nsobject<NSImageView> imageView(
+ base::scoped_nsobject<NSImageView> imageView(
[[NSImageView alloc] initWithFrame:frame]);
[imageView setImageFrameStyle:NSImageFrameNone];
[view addSubview:imageView.get()];
@@ -824,8 +824,9 @@ NSColor* IdentityVerifiedTextColor() {
- (NSButton*)addLinkButtonWithText:(NSString*)text toView:(NSView*)view {
// Frame size is arbitrary; it will be adjusted by the layout tweaker.
NSRect frame = NSMakeRect(kFramePadding, 0, 100, 10);
- scoped_nsobject<NSButton> button([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<HyperlinkButtonCell> cell(
+ base::scoped_nsobject<NSButton> button(
+ [[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<HyperlinkButtonCell> cell(
[[HyperlinkButtonCell alloc] initTextCell:text]);
[cell setControlSize:NSSmallControlSize];
[button setCell:cell.get()];
@@ -860,7 +861,7 @@ NSColor* IdentityVerifiedTextColor() {
atPoint:(NSPoint)point {
// Use an arbitrary width and height; it will be sized to fit.
NSRect frame = NSMakeRect(point.x, point.y, 1, 1);
- scoped_nsobject<NSPopUpButton> button(
+ base::scoped_nsobject<NSPopUpButton> button(
[[NSPopUpButton alloc] initWithFrame:frame pullsDown:NO]);
[button setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[button setBordered:NO];
@@ -896,7 +897,7 @@ NSColor* IdentityVerifiedTextColor() {
[button selectItemWithTag:permissionInfo.setting];
// Set the button title.
- scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
+ base::scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
string16 buttonTitle = WebsiteSettingsUI::PermissionActionToUIString(
permissionInfo.setting,
permissionInfo.default_setting,
diff --git a/chrome/browser/ui/cocoa/window_size_autosaver.h b/chrome/browser/ui/cocoa/window_size_autosaver.h
index 8d136e3..e167125 100644
--- a/chrome/browser/ui/cocoa/window_size_autosaver.h
+++ b/chrome/browser/ui/cocoa/window_size_autosaver.h
@@ -10,7 +10,8 @@ class PrefService;
// WindowSizeAutosaver is a helper class that makes it easy to let windows
// autoremember their position or position and size in a PrefService object.
-// To use this, add a |scoped_nsobject<WindowSizeAutosaver>| to your window
+// To use this, add a |base::scoped_nsobject<WindowSizeAutosaver>| to your
+// window
// controller and initialize it in the window controller's init method, passing
// a window and an autosave name. The autosaver will register for "window moved"
// and "window resized" notifications and write the current window state to the
diff --git a/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm b/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm
index 93e28f9..b8d553c 100644
--- a/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm
+++ b/chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm
@@ -6,7 +6,7 @@
#import "chrome/browser/ui/cocoa/window_size_autosaver.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
@@ -69,10 +69,10 @@ TEST_F(WindowSizeAutosaverTest, RestoresAndSavesPos) {
{
NSRect frame = [window_ frame];
// Empty state, shouldn't restore:
- scoped_nsobject<WindowSizeAutosaver> sizeSaver([[WindowSizeAutosaver alloc]
- initWithWindow:window_
- prefService:pref
- path:path_]);
+ base::scoped_nsobject<WindowSizeAutosaver> sizeSaver(
+ [[WindowSizeAutosaver alloc] initWithWindow:window_
+ prefService:pref
+ path:path_]);
EXPECT_EQ(NSMinX(frame), NSMinX([window_ frame]));
EXPECT_EQ(NSMinY(frame), NSMinY([window_ frame]));
EXPECT_EQ(NSWidth(frame), NSWidth([window_ frame]));
@@ -87,10 +87,10 @@ TEST_F(WindowSizeAutosaverTest, RestoresAndSavesPos) {
{
// Should restore last stored position, but not size.
- scoped_nsobject<WindowSizeAutosaver> sizeSaver([[WindowSizeAutosaver alloc]
- initWithWindow:window_
- prefService:pref
- path:path_]);
+ base::scoped_nsobject<WindowSizeAutosaver> sizeSaver(
+ [[WindowSizeAutosaver alloc] initWithWindow:window_
+ prefService:pref
+ path:path_]);
EXPECT_EQ(300, NSMinX([window_ frame]));
EXPECT_EQ(310, NSMinY([window_ frame]));
EXPECT_EQ(160, NSWidth([window_ frame]));
@@ -128,10 +128,10 @@ TEST_F(WindowSizeAutosaverTest, RestoresAndSavesRect) {
{
NSRect frame = [window_ frame];
// Empty state, shouldn't restore:
- scoped_nsobject<WindowSizeAutosaver> sizeSaver([[WindowSizeAutosaver alloc]
- initWithWindow:window_
- prefService:pref
- path:path_]);
+ base::scoped_nsobject<WindowSizeAutosaver> sizeSaver(
+ [[WindowSizeAutosaver alloc] initWithWindow:window_
+ prefService:pref
+ path:path_]);
EXPECT_EQ(NSMinX(frame), NSMinX([window_ frame]));
EXPECT_EQ(NSMinY(frame), NSMinY([window_ frame]));
EXPECT_EQ(NSWidth(frame), NSWidth([window_ frame]));
@@ -146,10 +146,10 @@ TEST_F(WindowSizeAutosaverTest, RestoresAndSavesRect) {
{
// Should restore last stored size
- scoped_nsobject<WindowSizeAutosaver> sizeSaver([[WindowSizeAutosaver alloc]
- initWithWindow:window_
- prefService:pref
- path:path_]);
+ base::scoped_nsobject<WindowSizeAutosaver> sizeSaver(
+ [[WindowSizeAutosaver alloc] initWithWindow:window_
+ prefService:pref
+ path:path_]);
EXPECT_EQ(300, NSMinX([window_ frame]));
EXPECT_EQ(310, NSMinY([window_ frame]));
EXPECT_EQ(250, NSWidth([window_ frame]));
@@ -187,10 +187,10 @@ TEST_F(WindowSizeAutosaverTest, DoesNotRestoreButClearsEmptyRect) {
{
// Window rect shouldn't change...
NSRect frame = [window_ frame];
- scoped_nsobject<WindowSizeAutosaver> sizeSaver([[WindowSizeAutosaver alloc]
- initWithWindow:window_
- prefService:pref
- path:path_]);
+ base::scoped_nsobject<WindowSizeAutosaver> sizeSaver(
+ [[WindowSizeAutosaver alloc] initWithWindow:window_
+ prefService:pref
+ path:path_]);
EXPECT_EQ(NSMinX(frame), NSMinX([window_ frame]));
EXPECT_EQ(NSMinY(frame), NSMinY([window_ frame]));
EXPECT_EQ(NSWidth(frame), NSWidth([window_ frame]));
diff --git a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm
index 76da79c..14266b6 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm
@@ -4,13 +4,13 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#include "third_party/ocmock/gtest_support.h"
class MenuTrackedRootViewTest : public CocoaTest {
public:
@@ -19,7 +19,7 @@ class MenuTrackedRootViewTest : public CocoaTest {
view_.reset([[MenuTrackedRootView alloc] init]);
}
- scoped_nsobject<MenuTrackedRootView> view_;
+ base::scoped_nsobject<MenuTrackedRootView> view_;
};
TEST_F(MenuTrackedRootViewTest, MouseUp) {
diff --git a/chrome/browser/ui/cocoa/wrench_menu/recent_tabs_menu_model_delegate.h b/chrome/browser/ui/cocoa/wrench_menu/recent_tabs_menu_model_delegate.h
index b1f2f42..d9cdd60 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/recent_tabs_menu_model_delegate.h
+++ b/chrome/browser/ui/cocoa/wrench_menu/recent_tabs_menu_model_delegate.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/models/menu_model_delegate.h"
namespace ui {
@@ -26,7 +26,7 @@ class RecentTabsMenuModelDelegate : public ui::MenuModelDelegate {
private:
ui::MenuModel* model_; // weak
- scoped_nsobject<NSMenu> menu_;
+ base::scoped_nsobject<NSMenu> menu_;
DISALLOW_COPY_AND_ASSIGN(RecentTabsMenuModelDelegate);
};
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
index 2e14478..bd334c2 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
@implementation WrenchMenuButtonCell
@@ -26,7 +26,7 @@
// The default state should be a subtle gray gradient.
if (![self isHighlighted]) {
NSColor* end = [NSColor colorWithDeviceWhite:0.922 alpha:1.0];
- scoped_nsobject<NSGradient> gradient(
+ base::scoped_nsobject<NSGradient> gradient(
[[NSGradient alloc] initWithStartingColor:[NSColor whiteColor]
endingColor:end]);
[gradient drawInRect:frame angle:90.0];
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell_unittest.mm
index 52791e2..2336393 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_button_cell.h"
@@ -32,7 +32,7 @@ class WrenchMenuButtonCellTest : public CocoaTest {
[button_ setButtonType:NSMomentaryPushInButton];
}
- scoped_nsobject<NSButton> button_;
+ base::scoped_nsobject<NSButton> button_;
};
TEST_F(WrenchMenuButtonCellTest, Draw) {
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h
index fd6a283..fdbc62f 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h
@@ -46,7 +46,7 @@ class ZoomLevelObserver;
// A shim NSViewController that loads the buttons from the NIB because ObjC
// doesn't have multiple inheritance as this class is a MenuController.
- scoped_nsobject<WrenchMenuButtonViewController> buttonViewController_;
+ base::scoped_nsobject<WrenchMenuButtonViewController> buttonViewController_;
// The browser for which this controller exists.
Browser* browser_; // weak
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
index cfa847e..2e41dd8 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -122,10 +122,8 @@ class ZoomLevelObserver {
// Handle the special-cased menu items.
int command_id = model->GetCommandIdAt(index);
- scoped_nsobject<NSMenuItem> customItem(
- [[NSMenuItem alloc] initWithTitle:@""
- action:nil
- keyEquivalent:@""]);
+ base::scoped_nsobject<NSMenuItem> customItem(
+ [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]);
MenuTrackedRootView* view;
switch (command_id) {
case IDC_EDIT_MENU:
@@ -162,9 +160,9 @@ class ZoomLevelObserver {
if (model && model == [self recentTabsMenuModel] &&
model->GetLabelFontAt([item tag])) {
DCHECK([menuItem attributedTitle]);
- scoped_nsobject<NSMutableAttributedString> title(
- [[NSMutableAttributedString alloc] initWithAttributedString:
- [menuItem attributedTitle]]);
+ base::scoped_nsobject<NSMutableAttributedString> title(
+ [[NSMutableAttributedString alloc]
+ initWithAttributedString:[menuItem attributedTitle]]);
[title addAttribute:NSForegroundColorAttributeName
value:[NSColor blackColor]
range:NSMakeRange(0, [title length])];
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
index 0d08c3c..d681db0 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -62,7 +62,7 @@ class WrenchMenuControllerTest : public CocoaProfileTest {
return controller_.get();
}
- scoped_nsobject<WrenchMenuController> controller_;
+ base::scoped_nsobject<WrenchMenuController> controller_;
scoped_ptr<MockWrenchMenuModel> fake_model_;
};
@@ -73,7 +73,7 @@ TEST_F(WrenchMenuControllerTest, Initialized) {
}
TEST_F(WrenchMenuControllerTest, DispatchSimple) {
- scoped_nsobject<NSButton> button([[NSButton alloc] init]);
+ base::scoped_nsobject<NSButton> button([[NSButton alloc] init]);
[button setTag:IDC_ZOOM_PLUS];
// Set fake model to test dispatching.
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
index e025ccc..4e45cf2 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
@@ -5,7 +5,7 @@
#import <AppKit/AppKit.h>
#import "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -45,7 +45,7 @@ TEST_F(UiGfxImageTest, DISABLED_CheckColor) {
}
TEST_F(UiGfxImageTest, ImageView) {
- scoped_nsobject<NSImageView> image_view(
+ base::scoped_nsobject<NSImageView> image_view(
[[NSImageView alloc] initWithFrame:NSMakeRect(10, 10, 25, 25)]);
[[test_window() contentView] addSubview:image_view];
[test_window() orderFront:nil];
diff --git a/chrome/browser/ui/webui/help/version_updater_mac.h b/chrome/browser/ui/webui/help/version_updater_mac.h
index 2b705d7..f2a82bc 100644
--- a/chrome/browser/ui/webui/help/version_updater_mac.h
+++ b/chrome/browser/ui/webui/help/version_updater_mac.h
@@ -8,7 +8,7 @@
#import <AppKit/AppKit.h>
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/webui/help/version_updater.h"
@class KeystoneObserver;
@@ -50,7 +50,7 @@ class VersionUpdaterMac : public VersionUpdater {
bool show_promote_button_;
// The observer that will receive keystone status updates.
- scoped_nsobject<KeystoneObserver> keystone_observer_;
+ base::scoped_nsobject<KeystoneObserver> keystone_observer_;
DISALLOW_COPY_AND_ASSIGN(VersionUpdaterMac);
};
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index 6f72d47..4cf3505 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -17,7 +17,7 @@
#include "base/mac/mac_logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index 6112245..09bc976 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -6,13 +6,13 @@
#import <Cocoa/Cocoa.h>
-#include <sys/xattr.h>
#include <errno.h>
+#include <sys/xattr.h>
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/mac/app_mode_common.h"
@@ -242,8 +242,8 @@ TEST(WebAppShortcutCreatorTest, UpdateIcon) {
base::FilePath icon_path =
dst_path.Append("Contents").Append("Resources").Append("app.icns");
- scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile:
- base::mac::FilePathToNSString(icon_path)]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc]
+ initWithContentsOfFile:base::mac::FilePathToNSString(icon_path)]);
EXPECT_TRUE(image);
EXPECT_EQ(product_logo.Width(), [image size].width);
EXPECT_EQ(product_logo.Height(), [image size].height);
diff --git a/chrome/common/mac/cfbundle_blocker.mm b/chrome/common/mac/cfbundle_blocker.mm
index e845283..41d3320 100644
--- a/chrome/common/mac/cfbundle_blocker.mm
+++ b/chrome/common/mac/cfbundle_blocker.mm
@@ -11,7 +11,7 @@
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "third_party/mach_override/mach_override.h"
@@ -157,7 +157,7 @@ Boolean ChromeCFBundleLoadExecutableAndReturnError(CFBundleRef bundle,
DCHECK(g_original_underscore_cfbundle_load_executable_and_return_error);
base::ScopedCFTypeRef<CFURLRef> url_cf(CFBundleCopyBundleURL(bundle));
- scoped_nsobject<NSString> path(base::mac::CFToNSCast(
+ base::scoped_nsobject<NSString> path(base::mac::CFToNSCast(
CFURLCopyFileSystemPath(url_cf, kCFURLPOSIXPathStyle)));
NSString* bundle_id = base::mac::CFToNSCast(CFBundleGetIdentifier(bundle));
diff --git a/chrome/common/mac/nscoder_util_unittest.mm b/chrome/common/mac/nscoder_util_unittest.mm
index 204ebd7..ed84a94 100644
--- a/chrome/common/mac/nscoder_util_unittest.mm
+++ b/chrome/common/mac/nscoder_util_unittest.mm
@@ -5,7 +5,7 @@
#import <Foundation/Foundation.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "chrome/common/mac/nscoder_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -27,12 +27,12 @@ TEST_F(NSCoderStdStringTest, encodeDecode) {
for (size_t i = 0; i < arraysize(testStrings); ++i) {
NSMutableData *data = [NSMutableData data];
- scoped_nsobject<NSKeyedArchiver> archiver(
+ base::scoped_nsobject<NSKeyedArchiver> archiver(
[[NSKeyedArchiver alloc] initForWritingWithMutableData:data]);
nscoder_util::EncodeString(archiver, @"test", testStrings[i]);
[archiver finishEncoding];
- scoped_nsobject<NSKeyedUnarchiver> unarchiver(
+ base::scoped_nsobject<NSKeyedUnarchiver> unarchiver(
[[NSKeyedUnarchiver alloc] initForReadingWithData:data]);
const std::string decoded = nscoder_util::DecodeString(unarchiver, @"test");
@@ -43,11 +43,11 @@ TEST_F(NSCoderStdStringTest, encodeDecode) {
TEST_F(NSCoderStdStringTest, decodeEmpty) {
NSMutableData *data = [NSMutableData data];
- scoped_nsobject<NSKeyedArchiver> archiver(
+ base::scoped_nsobject<NSKeyedArchiver> archiver(
[[NSKeyedArchiver alloc] initForWritingWithMutableData:data]);
[archiver finishEncoding];
- scoped_nsobject<NSKeyedUnarchiver> unarchiver(
+ base::scoped_nsobject<NSKeyedUnarchiver> unarchiver(
[[NSKeyedUnarchiver alloc] initForReadingWithData:data]);
const std::string decoded = nscoder_util::DecodeString(unarchiver, @"test");
diff --git a/chrome/common/mac/objc_method_swizzle.mm b/chrome/common/mac/objc_method_swizzle.mm
index 4ed4df8..b0fd42d 100644
--- a/chrome/common/mac/objc_method_swizzle.mm
+++ b/chrome/common/mac/objc_method_swizzle.mm
@@ -5,7 +5,7 @@
#import "chrome/common/mac/objc_method_swizzle.h"
#import "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
namespace ObjcEvilDoers {
diff --git a/chrome/common/mac/objc_method_swizzle_unittest.mm b/chrome/common/mac/objc_method_swizzle_unittest.mm
index 261e24d..3053f3b7 100644
--- a/chrome/common/mac/objc_method_swizzle_unittest.mm
+++ b/chrome/common/mac/objc_method_swizzle_unittest.mm
@@ -4,7 +4,7 @@
#import "chrome/common/mac/objc_method_swizzle.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
@interface ObjcMethodSwizzleTest : NSObject
@@ -58,7 +58,7 @@ TEST(ObjcMethodSwizzleTest, GetImplementedInstanceMethod) {
}
TEST(ObjcMethodSwizzleTest, SwizzleImplementedInstanceMethods) {
- scoped_nsobject<ObjcMethodSwizzleTest> object(
+ base::scoped_nsobject<ObjcMethodSwizzleTest> object(
[[ObjcMethodSwizzleTest alloc] init]);
EXPECT_EQ([object one], 1);
EXPECT_EQ([object two], 2);
diff --git a/chrome/common/mac/objc_zombie_unittest.mm b/chrome/common/mac/objc_zombie_unittest.mm
index bb11cf0..9e438d2 100644
--- a/chrome/common/mac/objc_zombie_unittest.mm
+++ b/chrome/common/mac/objc_zombie_unittest.mm
@@ -6,14 +6,14 @@
#include <objc/runtime.h>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "chrome/common/mac/objc_zombie.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@interface ZombieCxxDestructTest : NSObject
{
- scoped_nsobject<id> aRef_;
+ base::scoped_nsobject<id> aRef_;
}
- (id)initWith:(id)anObject;
@end
@@ -54,12 +54,12 @@ namespace {
// NOTE(shess): To test the negative, comment out the |g_objectDestruct()|
// call in |ZombieDealloc()|.
TEST(ObjcZombieTest, CxxDestructors) {
- scoped_nsobject<id> anObject([[NSObject alloc] init]);
+ base::scoped_nsobject<id> anObject([[NSObject alloc] init]);
EXPECT_EQ(1u, [anObject retainCount]);
ASSERT_TRUE(ObjcEvilDoers::ZombieEnable(YES, 100));
- scoped_nsobject<ZombieCxxDestructTest> soonInfected(
+ base::scoped_nsobject<ZombieCxxDestructTest> soonInfected(
[[ZombieCxxDestructTest alloc] initWith:anObject]);
EXPECT_EQ(2u, [anObject retainCount]);
@@ -76,12 +76,12 @@ TEST(ObjcZombieTest, CxxDestructors) {
// Verify that the associated objects are released when the object is
// released.
TEST(ObjcZombieTest, AssociatedObjectsReleased) {
- scoped_nsobject<id> anObject([[NSObject alloc] init]);
+ base::scoped_nsobject<id> anObject([[NSObject alloc] init]);
EXPECT_EQ(1u, [anObject retainCount]);
ASSERT_TRUE(ObjcEvilDoers::ZombieEnable(YES, 100));
- scoped_nsobject<ZombieAssociatedObjectTest> soonInfected(
+ base::scoped_nsobject<ZombieAssociatedObjectTest> soonInfected(
[[ZombieAssociatedObjectTest alloc] initWithAssociatedObject:anObject]);
EXPECT_EQ(2u, [anObject retainCount]);
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index 03a6124..0222710 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -16,7 +16,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/strings/string_util.h"
@@ -43,7 +43,7 @@ CFStringRef CopyServiceProcessLaunchDName() {
}
NSString* GetServiceProcessLaunchDLabel() {
- scoped_nsobject<NSString> name(
+ base::scoped_nsobject<NSString> name(
base::mac::CFToNSCast(CopyServiceProcessLaunchDName()));
NSString *label = [name stringByAppendingString:@".service_process"];
base::FilePath user_data_dir;
@@ -100,7 +100,7 @@ NSString* GetServiceProcessLaunchDSocketEnvVar() {
IPC::ChannelHandle GetServiceProcessChannel() {
base::mac::ScopedNSAutoreleasePool pool;
std::string socket_path;
- scoped_nsobject<NSDictionary> dictionary(
+ base::scoped_nsobject<NSDictionary> dictionary(
base::mac::CFToNSCast(Launchd::GetInstance()->CopyExports()));
NSString *ns_socket_path =
[dictionary objectForKey:GetServiceProcessLaunchDSocketEnvVar()];
@@ -127,8 +127,8 @@ bool ForceServiceProcessShutdown(const std::string& /* version */,
bool GetServiceProcessData(std::string* version, base::ProcessId* pid) {
base::mac::ScopedNSAutoreleasePool pool;
CFStringRef label = base::mac::NSToCFCast(GetServiceProcessLaunchDLabel());
- scoped_nsobject<NSDictionary> launchd_conf(base::mac::CFToNSCast(
- Launchd::GetInstance()->CopyJobDictionary(label)));
+ base::scoped_nsobject<NSDictionary> launchd_conf(
+ base::mac::CFToNSCast(Launchd::GetInstance()->CopyJobDictionary(label)));
if (!launchd_conf.get()) {
return false;
}
@@ -404,9 +404,8 @@ void ExecFilePathWatcherCallback::NotifyPathChanged(const base::FilePath& path,
std::string new_path = base::mac::PathFromFSRef(executable_fsref_);
NSString* ns_new_path = base::SysUTF8ToNSString(new_path);
[ns_plist setObject:ns_new_path forKey:@ LAUNCH_JOBKEY_PROGRAM];
- scoped_nsobject<NSMutableArray> args(
- [[ns_plist objectForKey:@ LAUNCH_JOBKEY_PROGRAMARGUMENTS]
- mutableCopy]);
+ base::scoped_nsobject<NSMutableArray> args([[ns_plist
+ objectForKey:@LAUNCH_JOBKEY_PROGRAMARGUMENTS] mutableCopy]);
[args replaceObjectAtIndex:0 withObject:ns_new_path];
[ns_plist setObject:args forKey:@ LAUNCH_JOBKEY_PROGRAMARGUMENTS];
if (!Launchd::GetInstance()->WritePlistToFile(Launchd::User,
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index 387c5b2..a394822 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -7,9 +7,9 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
-#import "content/browser/accessibility/browser_accessibility_delegate_mac.h"
+#import "base/mac/scoped_nsobject.h"
#include "content/browser/accessibility/browser_accessibility.h"
+#import "content/browser/accessibility/browser_accessibility_delegate_mac.h"
#include "content/common/accessibility_node_data.h"
// BrowserAccessibilityCocoa is a cocoa wrapper around the BrowserAccessibility
@@ -19,7 +19,7 @@
@interface BrowserAccessibilityCocoa : NSObject {
@private
content::BrowserAccessibility* browserAccessibility_;
- scoped_nsobject<NSMutableArray> children_;
+ base::scoped_nsobject<NSMutableArray> children_;
id<BrowserAccessibilityDelegateCocoa> delegate_;
}
diff --git a/content/browser/accessibility/browser_accessibility_mac.h b/content/browser/accessibility/browser_accessibility_mac.h
index a3df865..4031854 100644
--- a/content/browser/accessibility/browser_accessibility_mac.h
+++ b/content/browser/accessibility/browser_accessibility_mac.h
@@ -9,7 +9,7 @@
#include <utility>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "content/browser/accessibility/browser_accessibility.h"
@class BrowserAccessibilityCocoa;
diff --git a/content/browser/accessibility/browser_accessibility_mac_unittest.mm b/content/browser/accessibility/browser_accessibility_mac_unittest.mm
index 292c628..50ae167 100644
--- a/content/browser/accessibility/browser_accessibility_mac_unittest.mm
+++ b/content/browser/accessibility/browser_accessibility_mac_unittest.mm
@@ -95,8 +95,8 @@ class BrowserAccessibilityTest : public ui::CocoaTest {
retain]);
}
- scoped_nsobject<MockAccessibilityDelegate> delegate_;
- scoped_nsobject<BrowserAccessibilityCocoa> accessibility_;
+ base::scoped_nsobject<MockAccessibilityDelegate> delegate_;
+ base::scoped_nsobject<BrowserAccessibilityCocoa> accessibility_;
scoped_ptr<BrowserAccessibilityManager> manager_;
};
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
index 5d1be27..e637227 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
@@ -5,14 +5,14 @@
#include "content/browser/gamepad/gamepad_platform_data_fetcher_mac.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time.h"
-#include <IOKit/hid/IOHIDKeys.h>
#import <Foundation/Foundation.h>
+#include <IOKit/hid/IOHIDKeys.h>
using WebKit::WebGamepad;
using WebKit::WebGamepads;
@@ -60,7 +60,7 @@ GamepadPlatformDataFetcherMac::GamepadPlatformDataFetcherMac()
return;
}
- scoped_nsobject<NSArray> criteria([[NSArray alloc] initWithObjects:
+ base::scoped_nsobject<NSArray> criteria([[NSArray alloc] initWithObjects:
DeviceMatching(kGenericDesktopUsagePage, kJoystickUsageNumber),
DeviceMatching(kGenericDesktopUsagePage, kGameUsageNumber),
DeviceMatching(kGenericDesktopUsagePage, kMultiAxisUsageNumber),
diff --git a/content/browser/geolocation/core_location_data_provider_mac.h b/content/browser/geolocation/core_location_data_provider_mac.h
index 10e791b..29204aa 100644
--- a/content/browser/geolocation/core_location_data_provider_mac.h
+++ b/content/browser/geolocation/core_location_data_provider_mac.h
@@ -9,8 +9,8 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_DATA_PROVIDER_H_
#define CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_DATA_PROVIDER_H_
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_nsobject.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/geoposition.h"
@@ -44,7 +44,7 @@ class CoreLocationDataProviderMac
void PositionUpdated(Geoposition position);
// The wrapper class that supplies this class with position data
- scoped_nsobject<CoreLocationWrapperMac> wrapper_;
+ base::scoped_nsobject<CoreLocationWrapperMac> wrapper_;
// The LocationProvider class that should receive position data
CoreLocationProviderMac* provider_;
};
diff --git a/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm b/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
index ab4a729..81930e0 100644
--- a/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
+++ b/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
@@ -10,7 +10,7 @@
#import <Foundation/Foundation.h>
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/metrics/histogram.h"
#include "base/strings/sys_string_conversions.h"
@@ -58,8 +58,8 @@ class CoreWlanApi : public WifiDataProviderCommon::WlanApiInterface {
virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) OVERRIDE;
private:
- scoped_nsobject<NSBundle> bundle_;
- scoped_nsobject<NSString> merge_key_;
+ base::scoped_nsobject<NSBundle> bundle_;
+ base::scoped_nsobject<NSString> merge_key_;
DISALLOW_COPY_AND_ASSIGN(CoreWlanApi);
};
diff --git a/content/browser/renderer_host/clipboard_message_filter_mac.mm b/content/browser/renderer_host/clipboard_message_filter_mac.mm
index cdeabe6..ee8f5a3 100644
--- a/content/browser/renderer_host/clipboard_message_filter_mac.mm
+++ b/content/browser/renderer_host/clipboard_message_filter_mac.mm
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "content/public/browser/browser_thread.h"
#import "ui/base/cocoa/find_pasteboard.h"
@@ -31,7 +32,7 @@ class WriteFindPboardWrapper {
}
private:
- scoped_nsobject<NSString> text_;
+ base::scoped_nsobject<NSString> text_;
DISALLOW_COPY_AND_ASSIGN(WriteFindPboardWrapper);
};
diff --git a/content/browser/renderer_host/compositing_iosurface_context_mac.h b/content/browser/renderer_host/compositing_iosurface_context_mac.h
index e21839c..84ffc63 100644
--- a/content/browser/renderer_host/compositing_iosurface_context_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_context_mac.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/lazy_instance.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
namespace content {
@@ -53,7 +53,7 @@ class CompositingIOSurfaceContext
~CompositingIOSurfaceContext();
int window_number_;
- scoped_nsobject<NSOpenGLContext> nsgl_context_;
+ base::scoped_nsobject<NSOpenGLContext> nsgl_context_;
CGLContextObj cgl_context_; // weak, backed by |nsgl_context_|
bool is_vsync_disabled_;
scoped_ptr<CompositingIOSurfaceShaderPrograms> shader_program_cache_;
diff --git a/content/browser/renderer_host/compositing_iosurface_context_mac.mm b/content/browser/renderer_host/compositing_iosurface_context_mac.mm
index b7909cb..6394fe3 100644
--- a/content/browser/renderer_host/compositing_iosurface_context_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_context_mac.mm
@@ -37,7 +37,7 @@ CompositingIOSurfaceContext::Get(int window_number) {
attributes.push_back(NSOpenGLPFAAllowOfflineRenderers);
attributes.push_back(0);
- scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat(
+ base::scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat(
[[NSOpenGLPixelFormat alloc] initWithAttributes:&attributes.front()]);
if (!glPixelFormat) {
LOG(ERROR) << "NSOpenGLPixelFormat initWithAttributes failed";
@@ -49,9 +49,9 @@ CompositingIOSurfaceContext::Get(int window_number) {
NSOpenGLContext* share_context = nil;
if (!window_map()->empty())
share_context = window_map()->begin()->second->nsgl_context();
- scoped_nsobject<NSOpenGLContext> nsgl_context(
- [[NSOpenGLContext alloc] initWithFormat:glPixelFormat
- shareContext:share_context]);
+ base::scoped_nsobject<NSOpenGLContext> nsgl_context(
+ [[NSOpenGLContext alloc] initWithFormat:glPixelFormat
+ shareContext:share_context]);
if (!nsgl_context) {
LOG(ERROR) << "NSOpenGLContext initWithFormat failed";
return NULL;
diff --git a/content/browser/renderer_host/popup_menu_helper_mac.mm b/content/browser/renderer_host/popup_menu_helper_mac.mm
index 448dea5..d3f7063 100644
--- a/content/browser/renderer_host/popup_menu_helper_mac.mm
+++ b/content/browser/renderer_host/popup_menu_helper_mac.mm
@@ -6,8 +6,8 @@
#include "content/browser/renderer_host/popup_menu_helper_mac.h"
+#include "base/mac/scoped_nsobject.h"
#import "base/mac/scoped_sending_event.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/message_loop.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
@@ -49,16 +49,16 @@ void PopupMenuHelper::ShowPopupMenu(
// dealloced if my Destroy() method is called while the pop-up's up (which
// would in turn delete me, causing a crash once the -runMenuInView
// call returns. That's what was happening in <http://crbug.com/33250>).
- RenderWidgetHostViewMac* rwhvm =
- static_cast<RenderWidgetHostViewMac*>(GetRenderWidgetHostView());
- scoped_nsobject<RenderWidgetHostViewCocoa> cocoa_view
- ([rwhvm->cocoa_view() retain]);
+ RenderWidgetHostViewMac* rwhvm =
+ static_cast<RenderWidgetHostViewMac*>(GetRenderWidgetHostView());
+ base::scoped_nsobject<RenderWidgetHostViewCocoa> cocoa_view(
+ [rwhvm->cocoa_view() retain]);
// Display the menu.
- scoped_nsobject<WebMenuRunner> menu_runner;
- menu_runner.reset([[WebMenuRunner alloc] initWithItems:items
- fontSize:item_font_size
- rightAligned:right_aligned]);
+ base::scoped_nsobject<WebMenuRunner> menu_runner;
+ menu_runner.reset([[WebMenuRunner alloc] initWithItems:items
+ fontSize:item_font_size
+ rightAligned:right_aligned]);
{
// Make sure events can be pumped while the menu is up.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 63fad45..1b59990 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -12,7 +12,7 @@
#include <utility>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time.h"
@@ -62,7 +62,7 @@ class RenderWidgetHostViewMacEditCommandHelper;
id trackingRectOwner_; // (not retained)
void* trackingRectUserData_;
NSTrackingRectTag lastToolTipTag_;
- scoped_nsobject<NSString> toolTip_;
+ base::scoped_nsobject<NSString> toolTip_;
// Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
BOOL hasOpenMouseDown_;
@@ -70,7 +70,7 @@ class RenderWidgetHostViewMacEditCommandHelper;
NSWindow* lastWindow_; // weak
// The cursor for the page. This is passed up from the renderer.
- scoped_nsobject<NSCursor> currentCursor_;
+ base::scoped_nsobject<NSCursor> currentCursor_;
// Variables used by our implementaion of the NSTextInput protocol.
// An input method of Mac calls the methods of this protocol not only to
@@ -84,7 +84,7 @@ class RenderWidgetHostViewMacEditCommandHelper;
// handler which receives input-method events from the renderer.
// Represents the input-method attributes supported by this object.
- scoped_nsobject<NSArray> validAttributesForMarkedText_;
+ base::scoped_nsobject<NSArray> validAttributesForMarkedText_;
// Indicates if we are currently handling a key down event.
BOOL handlingKeyDown_;
@@ -399,8 +399,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
ui::TextInputType text_input_type_;
bool can_compose_inline_;
- scoped_nsobject<CALayer> software_layer_;
- scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
+ base::scoped_nsobject<CALayer> software_layer_;
+ base::scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
// Whether to allow overlapping views.
@@ -507,11 +507,11 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
std::string selected_text_;
// The window used for popup widgets.
- scoped_nsobject<NSWindow> popup_window_;
+ base::scoped_nsobject<NSWindow> popup_window_;
// The fullscreen window used for pepper flash.
- scoped_nsobject<NSWindow> pepper_fullscreen_window_;
- scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
+ base::scoped_nsobject<NSWindow> pepper_fullscreen_window_;
+ base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
// Our parent host view, if this is fullscreen. NULL otherwise.
RenderWidgetHostViewMac* fullscreen_parent_host_view_;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 21655da..c501e72 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -14,8 +14,8 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/mac/sdk_forward_declarations.h"
-#import "base/memory/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
@@ -2144,7 +2144,7 @@ void RenderWidgetHostViewMac::FrameSwapped() {
return;
}
- scoped_nsobject<RenderWidgetHostViewCocoa> keepSelfAlive([self retain]);
+ base::scoped_nsobject<RenderWidgetHostViewCocoa> keepSelfAlive([self retain]);
// Records the current marked text state, so that we can know if the marked
// text was deleted or not after handling the key down event.
@@ -3699,8 +3699,8 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
const std::string& str = renderWidgetHostView_->selected_text();
if (![types containsObject:NSStringPboardType] || str.empty()) return NO;
- scoped_nsobject<NSString> text([[NSString alloc]
- initWithUTF8String:str.c_str()]);
+ base::scoped_nsobject<NSString> text(
+ [[NSString alloc] initWithUTF8String:str.c_str()]);
NSArray* toDeclare = [NSArray arrayWithObject:NSStringPboardType];
[pboard declareTypes:toDeclare owner:nil];
return [pboard setString:text forType:NSStringPboardType];
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index 99748c6..72cf00f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -203,7 +203,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostImplTestHarness {
protected:
RenderWidgetHostViewMac* rwhv_mac_;
- scoped_nsobject<RenderWidgetHostViewCocoa> rwhv_cocoa_;
+ base::scoped_nsobject<RenderWidgetHostViewCocoa> rwhv_cocoa_;
private:
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMacTest);
@@ -226,8 +226,8 @@ TEST_F(RenderWidgetHostViewMacTest, AcceptsFirstResponder) {
}
TEST_F(RenderWidgetHostViewMacTest, TakesFocusOnMouseDown) {
- scoped_nsobject<CocoaTestHelperWindow>
- window([[CocoaTestHelperWindow alloc] init]);
+ base::scoped_nsobject<CocoaTestHelperWindow> window(
+ [[CocoaTestHelperWindow alloc] init]);
[[window contentView] addSubview:rwhv_cocoa_.get()];
// Even if the RWHVCocoa disallows first responder, clicking on it gives it
@@ -658,8 +658,8 @@ TEST_F(RenderWidgetHostViewMacTest, BlurAndFocusOnSetActive) {
RenderWidgetHostViewMac* view = static_cast<RenderWidgetHostViewMac*>(
RenderWidgetHostView::CreateViewForWidget(rwh));
- scoped_nsobject<CocoaTestHelperWindow>
- window([[CocoaTestHelperWindow alloc] init]);
+ base::scoped_nsobject<CocoaTestHelperWindow> window(
+ [[CocoaTestHelperWindow alloc] init]);
[[window contentView] addSubview:view->cocoa_view()];
EXPECT_CALL(*rwh, Focus());
@@ -744,8 +744,8 @@ TEST_F(RenderWidgetHostViewMacTest, IgnoreEmptyUnhandledWheelEvent) {
RenderWidgetHostView::CreateViewForWidget(host));
// Add a delegate to the view.
- scoped_nsobject<MockRenderWidgetHostViewMacDelegate> view_delegate(
- [[MockRenderWidgetHostViewMacDelegate alloc] init]);
+ base::scoped_nsobject<MockRenderWidgetHostViewMacDelegate> view_delegate(
+ [[MockRenderWidgetHostViewMacDelegate alloc] init]);
view->SetDelegate(view_delegate.get());
// Send an initial wheel event for scrolling by 3 lines.
diff --git a/content/browser/renderer_host/text_input_client_mac.h b/content/browser/renderer_host/text_input_client_mac.h
index 46d8512..53318f9 100644
--- a/content/browser/renderer_host/text_input_client_mac.h
+++ b/content/browser/renderer_host/text_input_client_mac.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
@@ -77,7 +77,7 @@ class CONTENT_EXPORT TextInputClientMac {
NSUInteger character_index_;
NSRect first_rect_;
- scoped_nsobject<NSAttributedString> substring_;
+ base::scoped_nsobject<NSAttributedString> substring_;
base::Lock lock_;
base::ConditionVariable condition_;
diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm
index 1158055..efb17b2 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -203,7 +203,7 @@ TEST_F(TextInputClientMacTest, GetSubstring) {
NSDictionary* attributes =
[NSDictionary dictionaryWithObject:[NSColor purpleColor]
forKey:NSForegroundColorAttributeName];
- scoped_nsobject<NSAttributedString> kSuccessValue(
+ base::scoped_nsobject<NSAttributedString> kSuccessValue(
[[NSAttributedString alloc] initWithString:@"Barney is a purple dinosaur"
attributes:attributes]);
diff --git a/content/browser/renderer_host/text_input_client_message_filter.mm b/content/browser/renderer_host/text_input_client_message_filter.mm
index 0849e02..5c8dfd9 100644
--- a/content/browser/renderer_host/text_input_client_message_filter.mm
+++ b/content/browser/renderer_host/text_input_client_message_filter.mm
@@ -4,7 +4,7 @@
#include "content/browser/renderer_host/text_input_client_message_filter.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/text_input_client_mac.h"
diff --git a/content/browser/renderer_host/webmenurunner_mac.h b/content/browser/renderer_host/webmenurunner_mac.h
index cdd7d61..28afb19 100644
--- a/content/browser/renderer_host/webmenurunner_mac.h
+++ b/content/browser/renderer_host/webmenurunner_mac.h
@@ -9,7 +9,7 @@
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "webkit/common/webmenuitem.h"
@@ -22,7 +22,7 @@
@interface WebMenuRunner : NSObject {
@private
// The native menu control.
- scoped_nsobject<NSMenu> menu_;
+ base::scoped_nsobject<NSMenu> menu_;
// A flag set to YES if a menu item was chosen, or NO if the menu was
// dismissed without selecting an item.
diff --git a/content/browser/renderer_host/webmenurunner_mac.mm b/content/browser/renderer_host/webmenurunner_mac.mm
index 5fe8535..2ff5137 100644
--- a/content/browser/renderer_host/webmenurunner_mac.mm
+++ b/content/browser/renderer_host/webmenurunner_mac.mm
@@ -54,9 +54,9 @@
// Set various alignment/language attributes. Note that many (if not most) of
// these attributes are functional only on 10.6 and above.
- scoped_nsobject<NSMutableDictionary> attrs(
+ base::scoped_nsobject<NSMutableDictionary> attrs(
[[NSMutableDictionary alloc] initWithCapacity:3]);
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setAlignment:rightAligned_ ? NSRightTextAlignment
: NSLeftTextAlignment];
@@ -67,10 +67,10 @@
[attrs setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];
if (item.has_directional_override) {
- scoped_nsobject<NSNumber> directionValue(
+ base::scoped_nsobject<NSNumber> directionValue(
[[NSNumber alloc] initWithInteger:
writingDirection + NSTextWritingDirectionOverride]);
- scoped_nsobject<NSArray> directionArray(
+ base::scoped_nsobject<NSArray> directionArray(
[[NSArray alloc] initWithObjects:directionValue.get(), nil]);
[attrs setObject:directionArray forKey:NSWritingDirectionAttributeName];
}
@@ -78,9 +78,8 @@
[attrs setObject:[NSFont menuFontOfSize:fontSize_]
forKey:NSFontAttributeName];
- scoped_nsobject<NSAttributedString> attrTitle(
- [[NSAttributedString alloc] initWithString:title
- attributes:attrs]);
+ base::scoped_nsobject<NSAttributedString> attrTitle(
+ [[NSAttributedString alloc] initWithString:title attributes:attrs]);
[menuItem setAttributedTitle:attrTitle];
[menuItem setTag:[menu_ numberOfItems] - 1];
@@ -104,8 +103,8 @@
// Set up the button cell, converting to NSView coordinates. The menu is
// positioned such that the currently selected menu item appears over the
// popup button, which is the expected Mac popup menu behavior.
- scoped_nsobject<NSPopUpButtonCell>
- cell([[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]);
+ base::scoped_nsobject<NSPopUpButtonCell> cell(
+ [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]);
[cell setMenu:menu_];
// We use selectItemWithTag below so if the index is out-of-bounds nothing
// bad happens.
@@ -127,7 +126,8 @@
// Unfortunately, instead of popping up above the passed |bounds|,
// it pops up above the bounds of the view passed to inView:. Use a
// dummy view to fake this out.
- scoped_nsobject<NSView> dummyView([[NSView alloc] initWithFrame:bounds]);
+ base::scoped_nsobject<NSView> dummyView(
+ [[NSView alloc] initWithFrame:bounds]);
[view addSubview:dummyView];
// Display the menu, and set a flag if a menu item was chosen.
diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h
index 58aac4b..16dffcd 100644
--- a/content/browser/web_contents/web_contents_view_mac.h
+++ b/content/browser/web_contents/web_contents_view_mac.h
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "content/common/drag_event_source_info.h"
@@ -38,8 +38,8 @@ CONTENT_EXPORT
@interface WebContentsViewCocoa : BaseView {
@private
content::WebContentsViewMac* webContentsView_; // WEAK; owns us
- scoped_nsobject<WebDragSource> dragSource_;
- scoped_nsobject<WebDragDest> dragDest_;
+ base::scoped_nsobject<WebDragSource> dragSource_;
+ base::scoped_nsobject<WebDragDest> dragDest_;
BOOL mouseDownCanMoveWindow_;
}
@@ -125,11 +125,11 @@ class WebContentsViewMac : public WebContentsViewPort,
WebContentsImpl* web_contents_;
// The Cocoa NSView that lives in the view hierarchy.
- scoped_nsobject<WebContentsViewCocoa> cocoa_view_;
+ base::scoped_nsobject<WebContentsViewCocoa> cocoa_view_;
// Keeps track of which NSView has focus so we can restore the focus when
// focus returns.
- scoped_nsobject<FocusTracker> focus_tracker_;
+ base::scoped_nsobject<FocusTracker> focus_tracker_;
// Our optional delegate.
scoped_ptr<WebContentsViewDelegate> delegate_;
diff --git a/content/browser/web_contents/web_contents_view_mac_unittest.mm b/content/browser/web_contents/web_contents_view_mac_unittest.mm
index e1ef379..71f7e48 100644
--- a/content/browser/web_contents/web_contents_view_mac_unittest.mm
+++ b/content/browser/web_contents/web_contents_view_mac_unittest.mm
@@ -4,10 +4,10 @@
#import "content/browser/web_contents/web_contents_view_mac.h"
-#include "base/memory/scoped_nsobject.h"
-#import "ui/base/test/ui_cocoa_test_helper.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+#import "ui/base/test/ui_cocoa_test_helper.h"
namespace {
@@ -15,8 +15,8 @@ class WebContentsViewCocoaTest : public ui::CocoaTest {
};
TEST_F(WebContentsViewCocoaTest, NonWebDragSourceTest) {
- scoped_nsobject<WebContentsViewCocoa>
- view([[WebContentsViewCocoa alloc] init]);
+ base::scoped_nsobject<WebContentsViewCocoa> view(
+ [[WebContentsViewCocoa alloc] init]);
// Tests that |draggingSourceOperationMaskForLocal:| returns the expected mask
// when dragging without a WebDragSource - i.e. when |startDragWithDropData:|
diff --git a/content/browser/web_contents/web_drag_dest_mac_unittest.mm b/content/browser/web_contents/web_drag_dest_mac_unittest.mm
index 1dc7fef..028f137 100644
--- a/content/browser/web_contents/web_drag_dest_mac_unittest.mm
+++ b/content/browser/web_contents/web_drag_dest_mac_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/mac/scoped_nsautorelease_pool.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/renderer_host/test_render_view_host.h"
@@ -53,7 +53,7 @@ class WebDragDestTest : public RenderViewHostImplTestHarness {
}
base::mac::ScopedNSAutoreleasePool pool_;
- scoped_nsobject<WebDragDest> drag_dest_;
+ base::scoped_nsobject<WebDragDest> drag_dest_;
};
// Make sure nothing leaks.
@@ -64,7 +64,7 @@ TEST_F(WebDragDestTest, Init) {
// Test flipping of coordinates given a point in window coordinates.
TEST_F(WebDragDestTest, Flip) {
NSPoint windowPoint = NSZeroPoint;
- scoped_nsobject<NSWindow> window([[CocoaTestHelperWindow alloc] init]);
+ base::scoped_nsobject<NSWindow> window([[CocoaTestHelperWindow alloc] init]);
NSPoint viewPoint =
[drag_dest_ flipWindowPointToView:windowPoint
view:[window contentView]];
diff --git a/content/browser/web_contents/web_drag_source_mac.h b/content/browser/web_contents/web_drag_source_mac.h
index e172551..87fb2b6 100644
--- a/content/browser/web_contents/web_drag_source_mac.h
+++ b/content/browser/web_contents/web_drag_source_mac.h
@@ -6,7 +6,7 @@
#include "base/files/file_path.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "googleurl/src/gurl.h"
@@ -31,13 +31,13 @@ CONTENT_EXPORT
scoped_ptr<WebDropData> dropData_;
// The image to show as drag image. Can be nil.
- scoped_nsobject<NSImage> dragImage_;
+ base::scoped_nsobject<NSImage> dragImage_;
// The offset to draw |dragImage_| at.
NSPoint imageOffset_;
// Our pasteboard.
- scoped_nsobject<NSPasteboard> pasteboard_;
+ base::scoped_nsobject<NSPasteboard> pasteboard_;
// A mask of the allowed drag operations.
NSDragOperation dragOperationMask_;
diff --git a/content/browser/web_contents/web_drag_source_mac_unittest.mm b/content/browser/web_contents/web_drag_source_mac_unittest.mm
index 0ffeeb6..96a401c 100644
--- a/content/browser/web_contents/web_drag_source_mac_unittest.mm
+++ b/content/browser/web_contents/web_drag_source_mac_unittest.mm
@@ -16,25 +16,24 @@ typedef RenderViewHostTestHarness WebDragSourceMacTest;
TEST_F(WebDragSourceMacTest, DragInvalidlyEscapedBookmarklet) {
scoped_ptr<WebContents> contents(CreateTestWebContents());
- scoped_nsobject<NSView> view(
+ base::scoped_nsobject<NSView> view(
[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 10, 10)]);
scoped_ptr<WebDropData> dropData(new WebDropData);
dropData->url = GURL("javascript:%");
WebContentsImpl* contentsImpl = static_cast<WebContentsImpl*>(contents.get());
- scoped_nsobject<WebDragSource> source(
- [[WebDragSource alloc]
- initWithContents:contentsImpl
- view:view
- dropData:dropData.get()
- image:nil
- offset:NSMakePoint(0, 0)
- pasteboard:[NSPasteboard pasteboardWithUniqueName]
- dragOperationMask:NSDragOperationCopy]);
+ base::scoped_nsobject<WebDragSource> source([[WebDragSource alloc]
+ initWithContents:contentsImpl
+ view:view
+ dropData:dropData.get()
+ image:nil
+ offset:NSMakePoint(0, 0)
+ pasteboard:[NSPasteboard pasteboardWithUniqueName]
+ dragOperationMask:NSDragOperationCopy]);
// Test that this call doesn't throw any exceptions: http://crbug.com/128371
- scoped_nsobject<NSPasteboard> pasteboard(
+ base::scoped_nsobject<NSPasteboard> pasteboard(
[NSPasteboard pasteboardWithUniqueName]);
[source lazyWriteToPasteboard:pasteboard forType:NSURLPboardType];
}
diff --git a/content/common/mac/attributed_string_coder.mm b/content/common/mac/attributed_string_coder.mm
index 37af9de..2f32ec3 100644
--- a/content/common/mac/attributed_string_coder.mm
+++ b/content/common/mac/attributed_string_coder.mm
@@ -7,7 +7,7 @@
#include <AppKit/AppKit.h>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "content/common/view_messages.h"
@@ -45,7 +45,7 @@ NSAttributedString* AttributedStringCoder::Decode(
const AttributedStringCoder::EncodedString* str) {
// Create the return value.
NSString* plain_text = base::SysUTF16ToNSString(str->string());
- scoped_nsobject<NSMutableAttributedString> decoded_string(
+ base::scoped_nsobject<NSMutableAttributedString> decoded_string(
[[NSMutableAttributedString alloc] initWithString:plain_text]);
// Iterate over all the encoded attributes, attaching each to the string.
const std::vector<FontAttribute> attributes = str->attributes();
diff --git a/content/common/mac/attributed_string_coder_unittest.mm b/content/common/mac/attributed_string_coder_unittest.mm
index 9555fc5..a98c48a 100644
--- a/content/common/mac/attributed_string_coder_unittest.mm
+++ b/content/common/mac/attributed_string_coder_unittest.mm
@@ -4,7 +4,7 @@
#include <AppKit/AppKit.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#import "content/common/mac/attributed_string_coder.h"
@@ -33,7 +33,7 @@ class AttributedStringCoderTest : public testing::Test {
};
TEST_F(AttributedStringCoderTest, SimpleString) {
- scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
+ base::scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
[attr_str addAttributes:FontAttribute(@"Helvetica", 12.5)
range:NSMakeRange(0, [attr_str length])];
@@ -42,13 +42,13 @@ TEST_F(AttributedStringCoderTest, SimpleString) {
}
TEST_F(AttributedStringCoderTest, NoAttributes) {
- scoped_nsobject<NSAttributedString> attr_str(NewAttrString());
+ base::scoped_nsobject<NSAttributedString> attr_str(NewAttrString());
NSAttributedString* decoded = EncodeAndDecode(attr_str.get());
EXPECT_NSEQ(attr_str.get(), decoded);
}
TEST_F(AttributedStringCoderTest, StripColor) {
- scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
+ base::scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
const NSUInteger kStringLength = [attr_str length];
[attr_str addAttribute:NSFontAttributeName
value:[NSFont systemFontOfSize:26]
@@ -68,7 +68,7 @@ TEST_F(AttributedStringCoderTest, StripColor) {
}
TEST_F(AttributedStringCoderTest, MultipleFonts) {
- scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
+ base::scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
[attr_str setAttributes:FontAttribute(@"Courier", 12)
range:NSMakeRange(0, 10)];
[attr_str addAttributes:FontAttribute(@"Helvetica", 16)
@@ -82,7 +82,7 @@ TEST_F(AttributedStringCoderTest, MultipleFonts) {
}
TEST_F(AttributedStringCoderTest, NoPertinentAttributes) {
- scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
+ base::scoped_nsobject<NSMutableAttributedString> attr_str(NewAttrString());
[attr_str addAttribute:NSForegroundColorAttributeName
value:[NSColor blueColor]
range:NSMakeRange(0, 10)];
@@ -95,7 +95,7 @@ TEST_F(AttributedStringCoderTest, NoPertinentAttributes) {
NSAttributedString* decoded = EncodeAndDecode(attr_str.get());
- scoped_nsobject<NSAttributedString> expected(NewAttrString());
+ base::scoped_nsobject<NSAttributedString> expected(NewAttrString());
EXPECT_NSEQ(expected.get(), decoded);
}
diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm
index bbb9852..6ecb7ca 100644
--- a/content/common/mac/font_loader.mm
+++ b/content/common/mac/font_loader.mm
@@ -13,7 +13,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "content/common/mac/font_descriptor.h"
@@ -112,7 +112,7 @@ void FontLoader::LoadFont(const FontDescriptor& font,
// it becomes impossible for the system to the find the original file ref
// since the font now lives in memory as far as it's concerned.
CTFontRef ct_font_to_encode = (CTFontRef)font_to_encode;
- scoped_nsobject<NSURL> font_url(
+ base::scoped_nsobject<NSURL> font_url(
base::mac::CFToNSCast(base::mac::CFCastStrict<CFURLRef>(
CTFontCopyAttribute(ct_font_to_encode, kCTFontURLAttribute))));
if (![font_url isFileURL]) {
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 9fd2657..b58c332 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -20,7 +20,7 @@ extern "C" {
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/rand_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
@@ -392,12 +392,12 @@ NSString* LoadSandboxTemplate(int sandbox_type) {
return nil;
}
- scoped_nsobject<NSString> common_sandbox_prefix_data(
+ base::scoped_nsobject<NSString> common_sandbox_prefix_data(
[[NSString alloc] initWithBytes:common_sandbox_definition.data()
length:common_sandbox_definition.length()
encoding:NSUTF8StringEncoding]);
- scoped_nsobject<NSString> sandbox_data(
+ base::scoped_nsobject<NSString> sandbox_data(
[[NSString alloc] initWithBytes:sandbox_definition.data()
length:sandbox_definition.length()
encoding:NSUTF8StringEncoding]);
diff --git a/content/shell/shell_browser_main_parts_mac.mm b/content/shell/shell_browser_main_parts_mac.mm
index 687c161..b2b84b7 100644
--- a/content/shell/shell_browser_main_parts_mac.mm
+++ b/content/shell/shell_browser_main_parts_mac.mm
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "content/shell/shell_application_mac.h"
namespace content {
@@ -16,9 +16,9 @@ void ShellBrowserMainParts::PreMainMessageLoopStart() {
// Force the NSApplication subclass to be used.
[ShellCrApplication sharedApplication];
- scoped_nsobject<NSNib>
- nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
- bundle:base::mac::FrameworkBundle()]);
+ base::scoped_nsobject<NSNib> nib(
+ [[NSNib alloc] initWithNibNamed:@"MainMenu"
+ bundle:base::mac::FrameworkBundle()]);
[nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
}
diff --git a/content/shell/shell_javascript_dialog_mac.mm b/content/shell/shell_javascript_dialog_mac.mm
index 6bdd9ab..0a89a89 100644
--- a/content/shell/shell_javascript_dialog_mac.mm
+++ b/content/shell/shell_javascript_dialog_mac.mm
@@ -6,7 +6,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "content/shell/shell_javascript_dialog_manager.h"
@@ -14,7 +14,7 @@
// going away. Is responsible for cleaning itself up.
@interface ShellJavaScriptDialogHelper : NSObject<NSAlertDelegate> {
@private
- scoped_nsobject<NSAlert> alert_;
+ base::scoped_nsobject<NSAlert> alert_;
NSTextField* textField_; // WEAK; owned by alert_
// Copies of the fields in ShellJavaScriptDialog because they're private.
diff --git a/content/shell/shell_login_dialog_mac.mm b/content/shell/shell_login_dialog_mac.mm
index 5a5d4df..b7d6947 100644
--- a/content/shell/shell_login_dialog_mac.mm
+++ b/content/shell/shell_login_dialog_mac.mm
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "content/public/browser/browser_thread.h"
#import "ui/base/cocoa/nib_loading.h"
@@ -24,7 +24,7 @@ const int kPasswordFieldTag = 2;
// going away.
@interface ShellLoginDialogHelper : NSObject<NSAlertDelegate> {
@private
- scoped_nsobject<NSAlert> alert_;
+ base::scoped_nsobject<NSAlert> alert_;
NSTextField* usernameField_; // WEAK; owned by alert_
NSSecureTextField* passwordField_; // WEAK; owned by alert_
}
diff --git a/content/shell/shell_mac.mm b/content/shell/shell_mac.mm
index be92130..7bb3b30 100644
--- a/content/shell/shell_mac.mm
+++ b/content/shell/shell_mac.mm
@@ -7,7 +7,7 @@
#include <algorithm>
#include "base/logging.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/string_piece.h"
#include "base/strings/sys_string_conversions.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -106,7 +106,8 @@ void MakeShellButton(NSRect* rect,
NSView* target,
NSString* key,
NSUInteger modifier) {
- scoped_nsobject<NSButton> button([[NSButton alloc] initWithFrame:*rect]);
+ base::scoped_nsobject<NSButton> button(
+ [[NSButton alloc] initWithFrame:*rect]);
[button setTitle:title];
[button setBezelStyle:NSSmallSquareBezelStyle];
[button setAutoresizingMask:(NSViewMaxXMargin | NSViewMinYMargin)];
@@ -222,7 +223,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
button_frame.size.width =
NSWidth(initial_window_bounds) - NSMinX(button_frame);
- scoped_nsobject<NSTextField> url_edit_view(
+ base::scoped_nsobject<NSTextField> url_edit_view(
[[NSTextField alloc] initWithFrame:button_frame]);
[content addSubview:url_edit_view];
[url_edit_view setAutoresizingMask:(NSViewWidthSizable | NSViewMinYMargin)];
diff --git a/crypto/apple_keychain_ios.mm b/crypto/apple_keychain_ios.mm
index c0b1048..74cf129 100644
--- a/crypto/apple_keychain_ios.mm
+++ b/crypto/apple_keychain_ios.mm
@@ -8,7 +8,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace {
@@ -32,7 +32,7 @@ CFDictionaryRef CreateGenericPasswordQuery(UInt32 serviceNameLength,
CFDictionarySetValue(query, kSecClass, kSecClassGenericPassword);
// Set the service name.
- scoped_nsobject<NSString> service_name_ns(
+ base::scoped_nsobject<NSString> service_name_ns(
[[NSString alloc] initWithBytes:serviceName
length:serviceNameLength
encoding:NSUTF8StringEncoding]);
@@ -40,7 +40,7 @@ CFDictionaryRef CreateGenericPasswordQuery(UInt32 serviceNameLength,
base::mac::NSToCFCast(service_name_ns));
// Set the account name.
- scoped_nsobject<NSString> account_name_ns(
+ base::scoped_nsobject<NSString> account_name_ns(
[[NSString alloc] initWithBytes:accountName
length:accountNameLength
encoding:NSUTF8StringEncoding]);
@@ -86,7 +86,7 @@ CFDictionaryRef CreateKeychainData(UInt32 serviceNameLength,
kSecAttrAccessibleWhenUnlocked);
// Set the service name.
- scoped_nsobject<NSString> service_name_ns(
+ base::scoped_nsobject<NSString> service_name_ns(
[[NSString alloc] initWithBytes:serviceName
length:serviceNameLength
encoding:NSUTF8StringEncoding]);
@@ -94,7 +94,7 @@ CFDictionaryRef CreateKeychainData(UInt32 serviceNameLength,
base::mac::NSToCFCast(service_name_ns));
// Set the account name.
- scoped_nsobject<NSString> account_name_ns(
+ base::scoped_nsobject<NSString> account_name_ns(
[[NSString alloc] initWithBytes:accountName
length:accountNameLength
encoding:NSUTF8StringEncoding]);
diff --git a/net/base/platform_mime_util_mac.mm b/net/base/platform_mime_util_mac.mm
index 1b61200..31bec5d 100644
--- a/net/base/platform_mime_util_mac.mm
+++ b/net/base/platform_mime_util_mac.mm
@@ -10,7 +10,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_cftyperef.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#if defined(OS_IOS)
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 36fd6dff..c0edc32 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -7,9 +7,9 @@
#include <string>
-#include "base/memory/scoped_nsobject.h"
-#include "printing/printing_context.h"
+#include "base/mac/scoped_nsobject.h"
#include "printing/print_job_constants.h"
+#include "printing/printing_context.h"
#ifdef __OBJC__
@class NSPrintInfo;
@@ -87,7 +87,7 @@ class PRINTING_EXPORT PrintingContextMac : public PrintingContext {
bool SetOutputColor(int color_mode);
// The native print info object.
- scoped_nsobject<NSPrintInfo> print_info_;
+ base::scoped_nsobject<NSPrintInfo> print_info_;
// The current page's context; only valid between NewPage and PageDone call
// pairs.
diff --git a/remoting/host/continue_window_mac.mm b/remoting/host/continue_window_mac.mm
index c8d3a8a..5ab2bdb 100644
--- a/remoting/host/continue_window_mac.mm
+++ b/remoting/host/continue_window_mac.mm
@@ -7,15 +7,15 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "remoting/host/continue_window.h"
// Handles the ContinueWindow.
@interface ContinueWindowMacController : NSObject {
@private
- scoped_nsobject<NSMutableArray> shades_;
- scoped_nsobject<NSAlert> continue_alert_;
+ base::scoped_nsobject<NSMutableArray> shades_;
+ base::scoped_nsobject<NSAlert> continue_alert_;
remoting::ContinueWindow* continue_window_;
const remoting::UiStrings* ui_strings_;
}
@@ -43,7 +43,7 @@ class ContinueWindowMac : public ContinueWindow {
virtual void HideUi() OVERRIDE;
private:
- scoped_nsobject<ContinueWindowMacController> controller_;
+ base::scoped_nsobject<ContinueWindowMacController> controller_;
DISALLOW_COPY_AND_ASSIGN(ContinueWindowMac);
};
@@ -136,7 +136,7 @@ scoped_ptr<HostWindow> HostWindow::CreateContinueWindow(
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *imagePath = [bundle pathForResource:@"chromoting128" ofType:@"png"];
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initByReferencingFile:imagePath]);
[continue_alert_ setIcon:image];
[continue_alert_ layout];
diff --git a/rlz/mac/lib/rlz_value_store_mac.h b/rlz/mac/lib/rlz_value_store_mac.h
index b7ffb4e..117e901 100644
--- a/rlz/mac/lib/rlz_value_store_mac.h
+++ b/rlz/mac/lib/rlz_value_store_mac.h
@@ -5,9 +5,9 @@
#ifndef RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_
#define RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_
-#include "rlz/lib/rlz_value_store.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
+#include "rlz/lib/rlz_value_store.h"
@class NSDictionary;
@class NSMutableDictionary;
@@ -69,8 +69,8 @@ class RlzValueStoreMac : public RlzValueStore {
// product p.
NSMutableDictionary* ProductDict(Product p);
- scoped_nsobject<NSMutableDictionary> dict_;
- scoped_nsobject<NSString> plist_path_;
+ base::scoped_nsobject<NSMutableDictionary> dict_;
+ base::scoped_nsobject<NSString> plist_path_;
DISALLOW_COPY_AND_ASSIGN(RlzValueStoreMac);
};
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
index 5622b5d..4d1ce00 100644
--- a/skia/ext/skia_utils_mac.mm
+++ b/skia/ext/skia_utils_mac.mm
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "skia/ext/bitmap_platform_device_mac.h"
#include "third_party/skia/include/core/SkRegion.h"
@@ -228,7 +228,7 @@ NSBitmapImageRep* SkBitmapToNSBitmapImageRepWithColorSpace(
SkCreateCGImageRefWithColorspace(skiaBitmap, colorSpace));
// Now convert to NSBitmapImageRep.
- scoped_nsobject<NSBitmapImageRep> bitmap(
+ base::scoped_nsobject<NSBitmapImageRep> bitmap(
[[NSBitmapImageRep alloc] initWithCGImage:cgimage]);
return [bitmap.release() autorelease];
}
@@ -238,7 +238,7 @@ NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& skiaBitmap,
if (skiaBitmap.isNull())
return nil;
- scoped_nsobject<NSImage> image([[NSImage alloc] init]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc] init]);
[image addRepresentation:
SkBitmapToNSBitmapImageRepWithColorSpace(skiaBitmap, colorSpace)];
[image setSize:NSMakeSize(skiaBitmap.width(), skiaBitmap.height())];
diff --git a/skia/ext/skia_utils_mac_unittest.mm b/skia/ext/skia_utils_mac_unittest.mm
index 353c52a..51b957eb 100644
--- a/skia/ext/skia_utils_mac_unittest.mm
+++ b/skia/ext/skia_utils_mac_unittest.mm
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "skia/ext/skia_utils_mac.mm"
+
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -57,7 +59,7 @@ SkBitmap SkiaUtilsMacTest::CreateSkBitmap(int width, int height,
}
NSImage* SkiaUtilsMacTest::CreateNSImage(int width, int height, bool isred) {
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithSize:NSMakeSize(width, height)]);
[image lockFocus];
if (isred)
diff --git a/ui/app_list/cocoa/app_list_view_controller.h b/ui/app_list/cocoa/app_list_view_controller.h
index e0e1ad7..95d8708 100644
--- a/ui/app_list/cocoa/app_list_view_controller.h
+++ b/ui/app_list/cocoa/app_list_view_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_export.h"
#import "ui/app_list/cocoa/apps_pagination_model_observer.h"
@@ -30,11 +30,12 @@ APP_LIST_EXPORT
AppsSearchBoxDelegate,
AppsSearchResultsDelegate> {
@private
- scoped_nsobject<AppsGridController> appsGridController_;
- scoped_nsobject<AppListPagerView> pagerControl_;
- scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_;
- scoped_nsobject<AppsSearchResultsController> appsSearchResultsController_;
- scoped_nsobject<NSView> contentsView_;
+ base::scoped_nsobject<AppsGridController> appsGridController_;
+ base::scoped_nsobject<AppListPagerView> pagerControl_;
+ base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_;
+ base::scoped_nsobject<AppsSearchResultsController>
+ appsSearchResultsController_;
+ base::scoped_nsobject<NSView> contentsView_;
scoped_ptr<app_list::AppListViewDelegate> delegate_;
BOOL showingSearchResults_;
}
diff --git a/ui/app_list/cocoa/app_list_view_controller.mm b/ui/app_list/cocoa/app_list_view_controller.mm
index 330c80d..7ef6bba 100644
--- a/ui/app_list/cocoa/app_list_view_controller.mm
+++ b/ui/app_list/cocoa/app_list_view_controller.mm
@@ -141,9 +141,9 @@ const NSTimeInterval kResultsAnimationDuration = 0.2;
[AppsGridController scrollerPadding]);
contentsView_.reset([[FlippedView alloc] initWithFrame:contentsRect]);
- scoped_nsobject<BackgroundView> backgroundView(
+ base::scoped_nsobject<BackgroundView> backgroundView(
[[BackgroundView alloc] initWithFrame:
- NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]);
+ NSMakeRect(0, 0, NSMaxX(contentsRect), NSMaxY(contentsRect))]);
appsSearchBoxController_.reset(
[[AppsSearchBoxController alloc] initWithFrame:
NSMakeRect(0, 0, NSWidth(contentsRect), kSearchInputHeight)]);
diff --git a/ui/app_list/cocoa/app_list_view_controller_unittest.mm b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
index 566819e..e14f884 100644
--- a/ui/app_list/cocoa/app_list_view_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_view_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "testing/gtest_mac.h"
#import "ui/app_list/cocoa/app_list_view_controller.h"
#import "ui/app_list/cocoa/apps_grid_controller.h"
@@ -37,7 +37,7 @@ class AppListViewControllerTest : public AppsGridControllerTestHelper {
}
protected:
- scoped_nsobject<AppListViewController> app_list_view_controller_;
+ base::scoped_nsobject<AppListViewController> app_list_view_controller_;
private:
DISALLOW_COPY_AND_ASSIGN(AppListViewControllerTest);
diff --git a/ui/app_list/cocoa/app_list_window_controller.h b/ui/app_list/cocoa/app_list_window_controller.h
index 57084ae..052682f 100644
--- a/ui/app_list/cocoa/app_list_window_controller.h
+++ b/ui/app_list/cocoa/app_list_window_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/app_list/app_list_export.h"
@class AppListViewController;
@@ -16,7 +16,7 @@
APP_LIST_EXPORT
@interface AppListWindowController : NSWindowController<NSWindowDelegate> {
@private
- scoped_nsobject<AppListViewController> appListViewController_;
+ base::scoped_nsobject<AppListViewController> appListViewController_;
}
- (AppListViewController*)appListViewController;
diff --git a/ui/app_list/cocoa/app_list_window_controller.mm b/ui/app_list/cocoa/app_list_window_controller.mm
index 94ee7ef..0eb5b2c 100644
--- a/ui/app_list/cocoa/app_list_window_controller.mm
+++ b/ui/app_list/cocoa/app_list_window_controller.mm
@@ -29,7 +29,7 @@
@implementation AppListWindowController;
- (id)init {
- scoped_nsobject<NSWindow> controlledWindow(
+ base::scoped_nsobject<NSWindow> controlledWindow(
[[AppListWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
diff --git a/ui/app_list/cocoa/app_list_window_controller_unittest.mm b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
index 12cccdb..8ea3544 100644
--- a/ui/app_list/cocoa/app_list_window_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "testing/gtest_mac.h"
#include "ui/app_list/app_list_view_delegate.h"
#import "ui/app_list/cocoa/app_list_view_controller.h"
@@ -19,7 +19,7 @@ class AppListWindowControllerTest : public ui::CocoaTest {
protected:
virtual void TearDown() OVERRIDE;
- scoped_nsobject<AppListWindowController> controller_;
+ base::scoped_nsobject<AppListWindowController> controller_;
app_list::test::AppListTestViewDelegate* delegate() {
return static_cast<app_list::test::AppListTestViewDelegate*>(
diff --git a/ui/app_list/cocoa/apps_collection_view_drag_manager.h b/ui/app_list/cocoa/apps_collection_view_drag_manager.h
index 79b77bb..e8b5caf 100644
--- a/ui/app_list/cocoa/apps_collection_view_drag_manager.h
+++ b/ui/app_list/cocoa/apps_collection_view_drag_manager.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/app_list/app_list_export.h"
@class AppsGridController;
@@ -19,7 +19,7 @@
APP_LIST_EXPORT
@interface AppsCollectionViewDragManager : NSObject {
@private
- scoped_nsobject<ItemDragController> itemDragController_;
+ base::scoped_nsobject<ItemDragController> itemDragController_;
AppsGridController* gridController_; // Weak. Owns us.
NSSize cellSize_;
diff --git a/ui/app_list/cocoa/apps_collection_view_drag_manager.mm b/ui/app_list/cocoa/apps_collection_view_drag_manager.mm
index f759888..a7cc8b2 100644
--- a/ui/app_list/cocoa/apps_collection_view_drag_manager.mm
+++ b/ui/app_list/cocoa/apps_collection_view_drag_manager.mm
@@ -59,7 +59,7 @@ const CGFloat kDragThreshold = 5;
}
- (NSCollectionView*)makePageWithFrame:(NSRect)pageFrame {
- scoped_nsobject<GridCollectionView> itemCollectionView(
+ base::scoped_nsobject<GridCollectionView> itemCollectionView(
[[GridCollectionView alloc] initWithFrame:pageFrame]);
[itemCollectionView setFactory:self];
[itemCollectionView setMaxNumberOfRows:rows_];
@@ -70,7 +70,7 @@ const CGFloat kDragThreshold = 5;
[itemCollectionView setBackgroundColors:
[NSArray arrayWithObject:[NSColor clearColor]]];
- scoped_nsobject<AppsGridViewItem> itemPrototype(
+ base::scoped_nsobject<AppsGridViewItem> itemPrototype(
[[AppsGridViewItem alloc] initWithSize:cellSize_]);
[[itemPrototype button] setTarget:gridController_];
[[itemPrototype button] setAction:@selector(onItemClicked:)];
diff --git a/ui/app_list/cocoa/apps_grid_controller.h b/ui/app_list/cocoa/apps_grid_controller.h
index 7db9fbf..7b3db09 100644
--- a/ui/app_list/cocoa/apps_grid_controller.h
+++ b/ui/app_list/cocoa/apps_grid_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_export.h"
#import "ui/app_list/cocoa/app_list_pager_view.h"
@@ -32,10 +32,10 @@ APP_LIST_EXPORT
app_list::AppListViewDelegate* delegate_; // Weak. Owned by view controller.
scoped_ptr<app_list::AppsGridDelegateBridge> bridge_;
- scoped_nsobject<AppsCollectionViewDragManager> dragManager_;
- scoped_nsobject<NSMutableArray> pages_;
- scoped_nsobject<NSMutableArray> items_;
- scoped_nsobject<NSTimer> scrollWhileDraggingTimer_;
+ base::scoped_nsobject<AppsCollectionViewDragManager> dragManager_;
+ base::scoped_nsobject<NSMutableArray> pages_;
+ base::scoped_nsobject<NSMutableArray> items_;
+ base::scoped_nsobject<NSTimer> scrollWhileDraggingTimer_;
id<AppsPaginationModelObserver> paginationObserver_;
diff --git a/ui/app_list/cocoa/apps_grid_controller.mm b/ui/app_list/cocoa/apps_grid_controller.mm
index 6d556426..200e853 100644
--- a/ui/app_list/cocoa/apps_grid_controller.mm
+++ b/ui/app_list/cocoa/apps_grid_controller.mm
@@ -340,12 +340,12 @@ class AppsGridDelegateBridge : public ui::ListModelObserver {
}
- (void)loadAndSetView {
- scoped_nsobject<PageContainerView> pagesContainer(
+ base::scoped_nsobject<PageContainerView> pagesContainer(
[[PageContainerView alloc] initWithFrame:NSZeroRect]);
NSRect scrollFrame = NSMakeRect(0, kGridTopPadding, kViewWidth,
kViewHeight + kScrollerPadding);
- scoped_nsobject<ScrollViewWithNoScrollbars> scrollView(
+ base::scoped_nsobject<ScrollViewWithNoScrollbars> scrollView(
[[ScrollViewWithNoScrollbars alloc] initWithFrame:scrollFrame]);
[scrollView setBorderType:NSNoBorder];
[scrollView setLineScroll:kViewWidth];
@@ -499,7 +499,8 @@ class AppsGridDelegateBridge : public ui::ListModelObserver {
- (void)moveItemInView:(size_t)fromIndex
toItemIndex:(size_t)toIndex {
- scoped_nsobject<NSValue> item([[items_ objectAtIndex:fromIndex] retain]);
+ base::scoped_nsobject<NSValue> item(
+ [[items_ objectAtIndex:fromIndex] retain]);
[items_ removeObjectAtIndex:fromIndex];
[items_ insertObject:item
atIndex:toIndex];
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index 426a390..7e31cdc 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#include "skia/ext/skia_utils_mac.h"
#import "testing/gtest_mac.h"
@@ -114,7 +114,7 @@ class AppsGridControllerTest : public AppsGridControllerTestHelper {
}
private:
- scoped_nsobject<AppsGridController> owned_apps_grid_controller_;
+ base::scoped_nsobject<AppsGridController> owned_apps_grid_controller_;
scoped_ptr<AppListTestViewDelegate> owned_delegate_;
DISALLOW_COPY_AND_ASSIGN(AppsGridControllerTest);
@@ -502,7 +502,7 @@ TEST_F(AppsGridControllerTest, MouseoverSelects) {
// Test AppsGridPaginationObserver totalPagesChanged().
TEST_F(AppsGridControllerTest, PaginationObserverPagesChanged) {
- scoped_nsobject<TestPaginationObserver> observer(
+ base::scoped_nsobject<TestPaginationObserver> observer(
[[TestPaginationObserver alloc] init]);
[apps_grid_controller_ setPaginationObserver:observer];
@@ -528,7 +528,7 @@ TEST_F(AppsGridControllerTest, PaginationObserverPagesChanged) {
// Test AppsGridPaginationObserver selectedPageChanged().
TEST_F(AppsGridControllerTest, PaginationObserverSelectedPageChanged) {
- scoped_nsobject<TestPaginationObserver> observer(
+ base::scoped_nsobject<TestPaginationObserver> observer(
[[TestPaginationObserver alloc] init]);
[apps_grid_controller_ setPaginationObserver:observer];
EXPECT_EQ(0, [[NSAnimationContext currentContext] duration]);
@@ -749,7 +749,7 @@ TEST_F(AppsGridControllerTest, DragAndDropMultiPage) {
// Test scrolling when dragging past edge or over the pager.
TEST_F(AppsGridControllerTest, ScrollingWhileDragging) {
- scoped_nsobject<TestPaginationObserver> observer(
+ base::scoped_nsobject<TestPaginationObserver> observer(
[[TestPaginationObserver alloc] init]);
[apps_grid_controller_ setPaginationObserver:observer];
diff --git a/ui/app_list/cocoa/apps_grid_view_item.mm b/ui/app_list/cocoa/apps_grid_view_item.mm
index 7059505..ee44394 100644
--- a/ui/app_list/cocoa/apps_grid_view_item.mm
+++ b/ui/app_list/cocoa/apps_grid_view_item.mm
@@ -5,7 +5,7 @@
#import "ui/app_list/cocoa/apps_grid_view_item.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "skia/ext/skia_utils_mac.h"
#include "ui/app_list/app_list_constants.h"
@@ -13,8 +13,8 @@
#include "ui/app_list/app_list_item_model_observer.h"
#import "ui/base/cocoa/menu_controller.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image_skia_util_mac.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/image/image_skia_util_mac.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
namespace {
@@ -43,7 +43,7 @@ class ItemModelObserverBridge : public app_list::AppListItemModelObserver {
private:
AppsGridViewItem* parent_; // Weak. Owns us.
AppListItemModel* model_; // Weak. Owned by AppListModel::Apps.
- scoped_nsobject<MenuController> context_menu_controller_;
+ base::scoped_nsobject<MenuController> context_menu_controller_;
DISALLOW_COPY_AND_ASSIGN(ItemModelObserverBridge);
};
@@ -172,7 +172,7 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
- (id)initWithSize:(NSSize)tileSize {
if ((self = [super init])) {
- scoped_nsobject<AppsGridItemButton> prototypeButton(
+ base::scoped_nsobject<AppsGridItemButton> prototypeButton(
[[AppsGridItemButton alloc] initWithFrame:NSMakeRect(
0, 0, tileSize.width, tileSize.height - kTileTopPadding)]);
@@ -183,9 +183,9 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
[prototypeButton setButtonType:NSMomentaryChangeButton];
[prototypeButton setBordered:NO];
- scoped_nsobject<AppsGridItemBackgroundView> prototypeButtonBackground(
- [[AppsGridItemBackgroundView alloc] initWithFrame:NSMakeRect(
- 0, 0, tileSize.width, tileSize.height)]);
+ base::scoped_nsobject<AppsGridItemBackgroundView> prototypeButtonBackground(
+ [[AppsGridItemBackgroundView alloc]
+ initWithFrame:NSMakeRect(0, 0, tileSize.width, tileSize.height)]);
[prototypeButtonBackground addSubview:prototypeButton];
[self setView:prototypeButtonBackground];
}
@@ -197,7 +197,7 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
}
- (void)setButtonTitle:(NSString*)newTitle {
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
[paragraphStyle setAlignment:NSCenterTextAlignment];
@@ -209,7 +209,7 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
gfx::SkColorToCalibratedNSColor(app_list::kGridTitleHoverColor) :
gfx::SkColorToCalibratedNSColor(app_list::kGridTitleColor)
};
- scoped_nsobject<NSAttributedString> attributedTitle(
+ base::scoped_nsobject<NSAttributedString> attributedTitle(
[[NSAttributedString alloc] initWithString:newTitle
attributes:titleAttributes]);
[[self button] setAttributedTitle:attributedTitle];
@@ -300,7 +300,7 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
return;
}
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
gfx::ScopedNSGraphicsContextSaveGState context;
[shadow setShadowOffset:NSMakeSize(0, -2)];
[shadow setShadowBlurRadius:2.0];
diff --git a/ui/app_list/cocoa/apps_search_box_controller.h b/ui/app_list/cocoa/apps_search_box_controller.h
index f373235..3e9b4b2 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.h
+++ b/ui/app_list/cocoa/apps_search_box_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_export.h"
@@ -34,10 +34,10 @@ class SearchBoxModelObserverBridge;
APP_LIST_EXPORT
@interface AppsSearchBoxController : NSViewController<NSTextFieldDelegate> {
@private
- scoped_nsobject<SearchTextField> searchTextField_;
- scoped_nsobject<NSImageView> searchImageView_;
- scoped_nsobject<HoverImageMenuButton> menuButton_;
- scoped_nsobject<AppListMenuController> menuController_;
+ base::scoped_nsobject<SearchTextField> searchTextField_;
+ base::scoped_nsobject<NSImageView> searchImageView_;
+ base::scoped_nsobject<HoverImageMenuButton> menuButton_;
+ base::scoped_nsobject<AppListMenuController> menuController_;
scoped_ptr<app_list::SearchBoxModelObserverBridge> bridge_;
scoped_ptr<app_list::AppListMenu> appListMenu_;
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 534a064..0456c16 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -139,7 +139,8 @@ void SearchBoxModelObserverBridge::TextChanged() {
- (id)initWithFrame:(NSRect)frame {
if ((self = [super init])) {
- scoped_nsobject<NSView> containerView([[NSView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSView> containerView(
+ [[NSView alloc] initWithFrame:frame]);
[self setView:containerView];
[self addSubviews];
}
@@ -370,7 +371,7 @@ void SearchBoxModelObserverBridge::TextChanged() {
if (model->GetCommandIdAt(index) != app_list::AppListMenu::CURRENT_USER)
return;
- scoped_nsobject<NSView> customItemView([[CurrentUserMenuItemView alloc]
+ base::scoped_nsobject<NSView> customItemView([[CurrentUserMenuItemView alloc]
initWithDelegate:[[searchBoxController_ delegate] appListDelegate]]);
[[menu itemAtIndex:index] setView:customItemView];
}
diff --git a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
index e2c2563..d702549 100644
--- a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/app_list/cocoa/apps_search_box_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#import "testing/gtest_mac.h"
@@ -87,8 +87,8 @@ class AppsSearchBoxControllerTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<TestAppsSearchBoxDelegate> delegate_;
- scoped_nsobject<AppsSearchBoxController> apps_search_box_controller_;
+ base::scoped_nsobject<TestAppsSearchBoxDelegate> delegate_;
+ base::scoped_nsobject<AppsSearchBoxController> apps_search_box_controller_;
private:
DISALLOW_COPY_AND_ASSIGN(AppsSearchBoxControllerTest);
@@ -176,7 +176,7 @@ class AppsSearchBoxCustomMenuItemTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<NSView> current_user_menu_item_;
+ base::scoped_nsobject<NSView> current_user_menu_item_;
private:
DISALLOW_COPY_AND_ASSIGN(AppsSearchBoxCustomMenuItemTest);
diff --git a/ui/app_list/cocoa/apps_search_results_controller.h b/ui/app_list/cocoa/apps_search_results_controller.h
index e135087..b69fc51 100644
--- a/ui/app_list/cocoa/apps_search_results_controller.h
+++ b/ui/app_list/cocoa/apps_search_results_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_export.h"
#import "ui/base/cocoa/tracking_area.h"
@@ -35,7 +35,7 @@ APP_LIST_EXPORT
@interface AppsSearchResultsController
: NSViewController<NSTableViewDelegate, NSTableViewDataSource> {
@private
- scoped_nsobject<NSTableView> tableView_;
+ base::scoped_nsobject<NSTableView> tableView_;
ui::ScopedCrTrackingArea trackingArea_;
NSPoint lastMouseDownInView_;
NSInteger hoveredRowIndex_;
diff --git a/ui/app_list/cocoa/apps_search_results_controller.mm b/ui/app_list/cocoa/apps_search_results_controller.mm
index ecc1660..5d4f754a 100644
--- a/ui/app_list/cocoa/apps_search_results_controller.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller.mm
@@ -46,8 +46,8 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
// Immutable class representing a search result in the NSTableView.
@interface AppsSearchResultRep : NSObject<NSCopying> {
@private
- scoped_nsobject<NSAttributedString> attributedStringValue_;
- scoped_nsobject<NSImage> resultIcon_;
+ base::scoped_nsobject<NSAttributedString> attributedStringValue_;
+ base::scoped_nsobject<NSImage> resultIcon_;
}
@property(readonly, nonatomic) NSAttributedString* attributedStringValue;
@@ -140,9 +140,9 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
userInfo:nil]);
[tableView_ addTrackingArea:trackingArea_.get()];
- scoped_nsobject<NSTableColumn> resultsColumn(
+ base::scoped_nsobject<NSTableColumn> resultsColumn(
[[NSTableColumn alloc] initWithIdentifier:@""]);
- scoped_nsobject<NSCell> resultsDataCell(
+ base::scoped_nsobject<NSCell> resultsDataCell(
[[AppsSearchResultsCell alloc] initTextCell:@""]);
[resultsColumn setDataCell:resultsDataCell];
[resultsColumn setWidth:size.width];
@@ -151,13 +151,13 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
// An NSTableView is normally put in a NSScrollView, but scrolling is not
// used for the app list. Instead, place it in a container with the desired
// size; flipped so the table is anchored to the top-left.
- scoped_nsobject<FlippedView> containerView([[FlippedView alloc] initWithFrame:
- NSMakeRect(0, 0, size.width, size.height)]);
+ base::scoped_nsobject<FlippedView> containerView([[FlippedView alloc]
+ initWithFrame:NSMakeRect(0, 0, size.width, size.height)]);
// The container is then anchored in an un-flipped view, initially hidden,
// so that |containerView| slides in from the top when showing results.
- scoped_nsobject<NSView> clipView([[NSView alloc] initWithFrame:
- NSMakeRect(0, 0, size.width, 0)]);
+ base::scoped_nsobject<NSView> clipView(
+ [[NSView alloc] initWithFrame:NSMakeRect(0, 0, size.width, 0)]);
[containerView addSubview:tableView_];
[clipView addSubview:containerView];
@@ -236,8 +236,9 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
byExtendingSelection:NO];
}
- scoped_nsobject<AppsSearchResultRep> resultRep([[AppsSearchResultRep alloc]
- initWithSearchResult:[self searchResults]->GetItemAt(rowIndex)]);
+ base::scoped_nsobject<AppsSearchResultRep> resultRep(
+ [[AppsSearchResultRep alloc]
+ initWithSearchResult:[self searchResults]->GetItemAt(rowIndex)]);
return resultRep.autorelease();
}
@@ -300,7 +301,7 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
- (NSMutableAttributedString*)createRenderText:(const base::string16&)content
tags:(const app_list::SearchResult::Tags&)tags {
NSFont* boldFont = nil;
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
NSDictionary* defaultAttributes = @{
@@ -309,7 +310,7 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
NSParagraphStyleAttributeName: paragraphStyle
};
- scoped_nsobject<NSMutableAttributedString> text(
+ base::scoped_nsobject<NSMutableAttributedString> text(
[[NSMutableAttributedString alloc]
initWithString:base::SysUTF16ToNSString(content)
attributes:defaultAttributes]);
@@ -357,7 +358,7 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
NSMutableAttributedString* detailText =
[self createRenderText:result->details()
tags:result->details_tags()];
- scoped_nsobject<NSAttributedString> lineBreak(
+ base::scoped_nsobject<NSAttributedString> lineBreak(
[[NSAttributedString alloc] initWithString:@"\n"]);
[titleText appendAttributedString:lineBreak];
[titleText appendAttributedString:detailText];
diff --git a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
index e93fb1f..cb170dc 100644
--- a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/app_list/cocoa/apps_search_results_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/stringprintf.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -82,8 +82,9 @@ class AppsSearchResultsControllerTest : public ui::CocoaTest {
virtual void TearDown() OVERRIDE;
protected:
- scoped_nsobject<TestAppsSearchResultsDelegate> delegate_;
- scoped_nsobject<AppsSearchResultsController> apps_search_results_controller_;
+ base::scoped_nsobject<TestAppsSearchResultsDelegate> delegate_;
+ base::scoped_nsobject<AppsSearchResultsController>
+ apps_search_results_controller_;
private:
DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsControllerTest);
diff --git a/ui/app_list/cocoa/apps_search_results_model_bridge.h b/ui/app_list/cocoa/apps_search_results_model_bridge.h
index f689890..3f40862 100644
--- a/ui/app_list/cocoa/apps_search_results_model_bridge.h
+++ b/ui/app_list/cocoa/apps_search_results_model_bridge.h
@@ -5,7 +5,7 @@
#ifndef UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_
#define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_vector.h"
#include "ui/app_list/app_list_model.h"
#include "ui/base/models/list_model_observer.h"
@@ -36,7 +36,7 @@ class AppsSearchResultsModelBridge : public ui::ListModelObserver {
virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE;
AppListModel::SearchResults* results_; // Weak. Owned by AppListModel.
- scoped_nsobject<NSTableView> table_view_;
+ base::scoped_nsobject<NSTableView> table_view_;
ScopedVector<ItemObserver> item_observers_;
DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsModelBridge);
diff --git a/ui/app_list/cocoa/current_user_menu_item_view.mm b/ui/app_list/cocoa/current_user_menu_item_view.mm
index dcc4838..6aac34c6 100644
--- a/ui/app_list/cocoa/current_user_menu_item_view.mm
+++ b/ui/app_list/cocoa/current_user_menu_item_view.mm
@@ -5,7 +5,7 @@
#import "ui/app_list/cocoa/current_user_menu_item_view.h"
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "grit/ui_resources.h"
#include "ui/app_list/app_list_view_delegate.h"
@@ -35,7 +35,7 @@ const CGFloat kMenuLeftMargin = 3;
GetNativeImageNamed(IDR_APP_LIST_USER_INDICATOR).AsNSImage();
NSRect imageRect = NSMakeRect(kMenuLeftMargin, 0, 0, 0);
imageRect.size = [userImage size];
- scoped_nsobject<NSImageView> userImageView(
+ base::scoped_nsobject<NSImageView> userImageView(
[[NSImageView alloc] initWithFrame:imageRect]);
[userImageView setImage:userImage];
[self addSubview:userImageView];
@@ -66,7 +66,7 @@ const CGFloat kMenuLeftMargin = 3;
labelText:(const string16&)labelText {
NSRect labelFrame = NSZeroRect;
labelFrame.origin = origin;
- scoped_nsobject<NSTextField> label(
+ base::scoped_nsobject<NSTextField> label(
[[NSTextField alloc] initWithFrame:labelFrame]);
[label setStringValue:base::SysUTF16ToNSString(labelText)];
[label setEditable:NO];
diff --git a/ui/app_list/cocoa/item_drag_controller.h b/ui/app_list/cocoa/item_drag_controller.h
index aaa87bc..4e1c747 100644
--- a/ui/app_list/cocoa/item_drag_controller.h
+++ b/ui/app_list/cocoa/item_drag_controller.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@class AppsGridViewItem;
@@ -19,8 +19,8 @@
// item location in the grid.
@interface ItemDragController : NSViewController {
@private
- scoped_nsobject<CALayer> dragLayer_;
- scoped_nsobject<NSButton> buttonToRestore_;
+ base::scoped_nsobject<CALayer> dragLayer_;
+ base::scoped_nsobject<NSButton> buttonToRestore_;
NSPoint mouseOffset_;
NSTimeInterval growStart_;
BOOL shrinking_;
diff --git a/ui/app_list/cocoa/item_drag_controller.mm b/ui/app_list/cocoa/item_drag_controller.mm
index 66a5fdd..994ac9d 100644
--- a/ui/app_list/cocoa/item_drag_controller.mm
+++ b/ui/app_list/cocoa/item_drag_controller.mm
@@ -37,7 +37,8 @@ NSString* const kGrowAnimationKey = @"growAnimation";
0,
size.width * kDraggingIconScale,
size.height * kDraggingIconScale);
- scoped_nsobject<NSView> dragView([[NSView alloc] initWithFrame:frameRect]);
+ base::scoped_nsobject<NSView> dragView(
+ [[NSView alloc] initWithFrame:frameRect]);
[dragView setWantsLayer:YES];
[dragView setHidden:YES];
@@ -65,7 +66,7 @@ NSString* const kGrowAnimationKey = @"growAnimation";
// Take a snapshot of the grid cell without the text label and hide the cell.
// Also remove the cell highlight on the image, added when it was clicked.
NSButton* button = [item button];
- scoped_nsobject<NSString> oldTitle([[item buttonTitle] retain]);
+ base::scoped_nsobject<NSString> oldTitle([[item buttonTitle] retain]);
[item setButtonTitle:[NSString string]];
[[button cell] setHighlighted:NO];
NSBitmapImageRep* imageRep =
@@ -160,7 +161,7 @@ NSString* const kGrowAnimationKey = @"growAnimation";
NSViewAnimationEndFrameKey: [NSValue valueWithRect:targetRect]
};
- scoped_nsobject<NSViewAnimation> translate([[NSViewAnimation alloc]
+ base::scoped_nsobject<NSViewAnimation> translate([[NSViewAnimation alloc]
initWithViewAnimations:[NSArray arrayWithObject:animationDict]]);
[translate setDuration:kAnimationDuration];
[translate startAnimation];
diff --git a/ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm b/ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm
index 2057cfe..e200209 100644
--- a/ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm
+++ b/ui/app_list/cocoa/scroll_view_with_no_scrollbars.mm
@@ -5,7 +5,7 @@
#include "ui/app_list/cocoa/scroll_view_with_no_scrollbars.h"
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#if !defined(MAC_OS_X_VERSION_10_7) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
@@ -52,7 +52,7 @@ typedef NSUInteger NSEventPhase;
[self setHasHorizontalScroller:base::mac::IsOSLionOrLater()];
NSRect horizontalScrollerRect = [self bounds];
horizontalScrollerRect.size.height = 0;
- scoped_nsobject<InvisibleScroller> horizontalScroller(
+ base::scoped_nsobject<InvisibleScroller> horizontalScroller(
[[InvisibleScroller alloc] initWithFrame:horizontalScrollerRect]);
[self setHorizontalScroller:horizontalScroller];
}
diff --git a/ui/aura/root_window_host_mac.mm b/ui/aura/root_window_host_mac.mm
index 35b1fc0..28943a9 100644
--- a/ui/aura/root_window_host_mac.mm
+++ b/ui/aura/root_window_host_mac.mm
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
#include "ui/aura/root_window_host.h"
@@ -67,7 +67,7 @@ class RootWindowHostMac : public RootWindowHost,
// An NSWindowController for the root window. Controls the actual Cocoa
// window on Mac.
- scoped_nsobject<NSWindowController> controller_;
+ base::scoped_nsobject<NSWindowController> controller_;
DISALLOW_COPY_AND_ASSIGN(RootWindowHostMac);
};
diff --git a/ui/base/accelerators/platform_accelerator_cocoa.h b/ui/base/accelerators/platform_accelerator_cocoa.h
index 5ac8261..30941c7 100644
--- a/ui/base/accelerators/platform_accelerator_cocoa.h
+++ b/ui/base/accelerators/platform_accelerator_cocoa.h
@@ -7,7 +7,7 @@
#include <Foundation/Foundation.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/accelerators/platform_accelerator.h"
namespace ui {
@@ -28,7 +28,7 @@ class UI_EXPORT PlatformAcceleratorCocoa : public PlatformAccelerator {
private:
// String of characters for the key equivalent.
- scoped_nsobject<NSString> characters_;
+ base::scoped_nsobject<NSString> characters_;
NSUInteger modifier_mask_;
DISALLOW_COPY_AND_ASSIGN(PlatformAcceleratorCocoa);
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
index bb5bfae..575fe5a 100644
--- a/ui/base/clipboard/clipboard_mac.mm
+++ b/ui/base/clipboard/clipboard_mac.mm
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/stl_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -185,11 +185,11 @@ void Clipboard::WriteBitmap(const char* pixel_data, const char* size_data) {
data_provider.reset();
data.reset();
- scoped_nsobject<NSBitmapImageRep> bitmap(
+ base::scoped_nsobject<NSBitmapImageRep> bitmap(
[[NSBitmapImageRep alloc] initWithCGImage:cgimage]);
cgimage.reset();
- scoped_nsobject<NSImage> image([[NSImage alloc] init]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc] init]);
[image addRepresentation:bitmap];
// An API to ask the NSImage to write itself to the clipboard comes in 10.6 :(
@@ -343,7 +343,7 @@ SkBitmap Clipboard::ReadImage(Buffer buffer) const {
DCHECK(CalledOnValidThread());
DCHECK_EQ(buffer, BUFFER_STANDARD);
- scoped_nsobject<NSImage> image(
+ base::scoped_nsobject<NSImage> image(
[[NSImage alloc] initWithPasteboard:GetPasteboard()]);
if (!image.get())
return SkBitmap();
diff --git a/ui/base/cocoa/base_view.h b/ui/base/cocoa/base_view.h
index f9bc275..df634fc 100644
--- a/ui/base/cocoa/base_view.h
+++ b/ui/base/cocoa/base_view.h
@@ -7,9 +7,9 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
-#include "ui/base/ui_export.h"
+#include "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/tracking_area.h"
+#include "ui/base/ui_export.h"
#include "ui/gfx/rect.h"
// A view that provides common functionality that many views will need:
@@ -21,7 +21,7 @@ UI_EXPORT
@private
ui::ScopedCrTrackingArea trackingArea_;
BOOL dragging_;
- scoped_nsobject<NSEvent> pendingExitEvent_;
+ base::scoped_nsobject<NSEvent> pendingExitEvent_;
}
// Override these methods in a subclass.
diff --git a/ui/base/cocoa/base_view_unittest.mm b/ui/base/cocoa/base_view_unittest.mm
index a28c6d3..f9b0690 100644
--- a/ui/base/cocoa/base_view_unittest.mm
+++ b/ui/base/cocoa/base_view_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "ui/base/cocoa/base_view.h"
@@ -16,7 +16,8 @@ class BaseViewTest : public ui::CocoaTest {
public:
BaseViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 100);
- scoped_nsobject<BaseView> view([[BaseView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<BaseView> view(
+ [[BaseView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
diff --git a/ui/base/cocoa/controls/hover_image_menu_button_cell.h b/ui/base/cocoa/controls/hover_image_menu_button_cell.h
index 1da338b..fad48fe 100644
--- a/ui/base/cocoa/controls/hover_image_menu_button_cell.h
+++ b/ui/base/cocoa/controls/hover_image_menu_button_cell.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_export.h"
// A custom NSPopUpButtonCell that permits a hover image, and draws only an
@@ -17,7 +17,7 @@
UI_EXPORT
@interface HoverImageMenuButtonCell : NSPopUpButtonCell {
@private
- scoped_nsobject<NSImage> hoverImage_;
+ base::scoped_nsobject<NSImage> hoverImage_;
BOOL hovered_;
}
diff --git a/ui/base/cocoa/controls/hover_image_menu_button_cell.mm b/ui/base/cocoa/controls/hover_image_menu_button_cell.mm
index 32a9d69..10e93fb 100644
--- a/ui/base/cocoa/controls/hover_image_menu_button_cell.mm
+++ b/ui/base/cocoa/controls/hover_image_menu_button_cell.mm
@@ -51,7 +51,7 @@
}
- (void)setDefaultImage:(NSImage*)defaultImage {
- scoped_nsobject<NSMenuItem> buttonMenuItem([[NSMenuItem alloc] init]);
+ base::scoped_nsobject<NSMenuItem> buttonMenuItem([[NSMenuItem alloc] init]);
[buttonMenuItem setImage:defaultImage];
[self setMenuItem:buttonMenuItem];
}
diff --git a/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm b/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
index 45ed3689..bf64f40 100644
--- a/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
+++ b/ui/base/cocoa/controls/hover_image_menu_button_unittest.mm
@@ -23,10 +23,10 @@ class HoverImageMenuButtonTest : public CocoaTest {
virtual void SetUp() OVERRIDE;
protected:
- scoped_nsobject<HoverImageMenuButton> menu_button_;
- scoped_nsobject<NSImage> normal_;
- scoped_nsobject<NSImage> pressed_;
- scoped_nsobject<NSImage> hovered_;
+ base::scoped_nsobject<HoverImageMenuButton> menu_button_;
+ base::scoped_nsobject<NSImage> normal_;
+ base::scoped_nsobject<NSImage> pressed_;
+ base::scoped_nsobject<NSImage> hovered_;
DISALLOW_COPY_AND_ASSIGN(HoverImageMenuButtonTest);
};
diff --git a/ui/base/cocoa/find_pasteboard.h b/ui/base/cocoa/find_pasteboard.h
index 92c3b0a..aada8a7 100644
--- a/ui/base/cocoa/find_pasteboard.h
+++ b/ui/base/cocoa/find_pasteboard.h
@@ -11,7 +11,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_export.h"
UI_EXPORT extern NSString* kFindPasteboardChangedNotification;
@@ -28,7 +28,7 @@ UI_EXPORT extern NSString* kFindPasteboardChangedNotification;
UI_EXPORT
@interface FindPasteboard : NSObject {
@private
- scoped_nsobject<NSString> findText_;
+ base::scoped_nsobject<NSString> findText_;
}
// Returns the singleton instance of this class.
diff --git a/ui/base/cocoa/focus_tracker.h b/ui/base/cocoa/focus_tracker.h
index 82165c7..6a0c3ba 100644
--- a/ui/base/cocoa/focus_tracker.h
+++ b/ui/base/cocoa/focus_tracker.h
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_export.h"
// A class that handles saving and restoring focus. An instance of
@@ -15,7 +15,7 @@
UI_EXPORT
@interface FocusTracker : NSObject {
@private
- scoped_nsobject<NSView> focusedView_;
+ base::scoped_nsobject<NSView> focusedView_;
}
// |window| is the window that we are saving focus for. This
diff --git a/ui/base/cocoa/focus_tracker_unittest.mm b/ui/base/cocoa/focus_tracker_unittest.mm
index 53aae6e..0fb70c1 100644
--- a/ui/base/cocoa/focus_tracker_unittest.mm
+++ b/ui/base/cocoa/focus_tracker_unittest.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#import "ui/base/cocoa/focus_tracker.h"
@@ -16,7 +16,8 @@ class FocusTrackerTest : public ui::CocoaTest {
public:
virtual void SetUp() {
ui::CocoaTest::SetUp();
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> view(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
viewA_ = view.get();
[[test_window() contentView] addSubview:viewA_];
@@ -33,7 +34,7 @@ class FocusTrackerTest : public ui::CocoaTest {
TEST_F(FocusTrackerTest, SaveRestore) {
NSWindow* window = test_window();
ASSERT_TRUE([window makeFirstResponder:viewA_]);
- scoped_nsobject<FocusTracker> tracker(
+ base::scoped_nsobject<FocusTracker> tracker(
[[FocusTracker alloc] initWithWindow:window]);
// Give focus to |viewB_|, then try and restore it to view1.
ASSERT_TRUE([window makeFirstResponder:viewB_]);
@@ -45,12 +46,13 @@ TEST_F(FocusTrackerTest, SaveRestoreWithTextView) {
// Valgrind will complain if the text field has zero size.
NSRect frame = NSMakeRect(0, 0, 100, 20);
NSWindow* window = test_window();
- scoped_nsobject<NSTextField> text([[NSTextField alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSTextField> text(
+ [[NSTextField alloc] initWithFrame:frame]);
[[window contentView] addSubview:text];
ASSERT_TRUE([window makeFirstResponder:text]);
- scoped_nsobject<FocusTracker> tracker([[FocusTracker alloc]
- initWithWindow:window]);
+ base::scoped_nsobject<FocusTracker> tracker(
+ [[FocusTracker alloc] initWithWindow:window]);
// Give focus to |viewB_|, then try and restore it to the text field.
ASSERT_TRUE([window makeFirstResponder:viewB_]);
EXPECT_TRUE([tracker restoreFocusInWindow:window]);
@@ -59,11 +61,12 @@ TEST_F(FocusTrackerTest, SaveRestoreWithTextView) {
TEST_F(FocusTrackerTest, DontRestoreToViewNotInWindow) {
NSWindow* window = test_window();
- scoped_nsobject<NSView> viewC([[NSView alloc] initWithFrame:NSZeroRect]);
+ base::scoped_nsobject<NSView> viewC(
+ [[NSView alloc] initWithFrame:NSZeroRect]);
[[window contentView] addSubview:viewC];
ASSERT_TRUE([window makeFirstResponder:viewC]);
- scoped_nsobject<FocusTracker> tracker(
+ base::scoped_nsobject<FocusTracker> tracker(
[[FocusTracker alloc] initWithWindow:window]);
// Give focus to |viewB_|, then remove viewC from the hierarchy and try
@@ -76,7 +79,7 @@ TEST_F(FocusTrackerTest, DontRestoreToViewNotInWindow) {
TEST_F(FocusTrackerTest, DontRestoreFocusToViewInDifferentWindow) {
NSWindow* window = test_window();
ASSERT_TRUE([window makeFirstResponder:viewA_]);
- scoped_nsobject<FocusTracker> tracker(
+ base::scoped_nsobject<FocusTracker> tracker(
[[FocusTracker alloc] initWithWindow:window]);
// Give focus to |viewB_|, then try and restore focus in a different
diff --git a/ui/base/cocoa/fullscreen_window_manager.h b/ui/base/cocoa/fullscreen_window_manager.h
index 3258dff..1b18912 100644
--- a/ui/base/cocoa/fullscreen_window_manager.h
+++ b/ui/base/cocoa/fullscreen_window_manager.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_export.h"
// A utility class to manage the fullscreen mode for a given window. This class
@@ -16,11 +16,11 @@
UI_EXPORT
@interface FullscreenWindowManager : NSObject {
@private
- scoped_nsobject<NSWindow> window_;
+ base::scoped_nsobject<NSWindow> window_;
// Explicitly keep track of the screen we want to position the window in.
// This is better than using -[NSWindow screen] because that might change if
// the screen changes to a low resolution.
- scoped_nsobject<NSScreen> desiredScreen_;
+ base::scoped_nsobject<NSScreen> desiredScreen_;
base::mac::FullScreenMode fullscreenMode_;
BOOL fullscreenActive_;
}
diff --git a/ui/base/cocoa/fullscreen_window_manager_unittest.mm b/ui/base/cocoa/fullscreen_window_manager_unittest.mm
index 710ec79..5f9ff2f 100644
--- a/ui/base/cocoa/fullscreen_window_manager_unittest.mm
+++ b/ui/base/cocoa/fullscreen_window_manager_unittest.mm
@@ -11,10 +11,9 @@
typedef ui::CocoaTest FullscreenWindowManagerTest;
TEST_F(FullscreenWindowManagerTest, EnterExit) {
- scoped_nsobject<FullscreenWindowManager> manager(
- [[FullscreenWindowManager alloc]
- initWithWindow:test_window()
- desiredScreen:[NSScreen mainScreen]]);
+ base::scoped_nsobject<FullscreenWindowManager> manager(
+ [[FullscreenWindowManager alloc] initWithWindow:test_window()
+ desiredScreen:[NSScreen mainScreen]]);
NSApplicationPresentationOptions current_options =
[NSApp presentationOptions];
diff --git a/ui/base/cocoa/hover_button.h b/ui/base/cocoa/hover_button.h
index e665d3a..e845d08 100644
--- a/ui/base/cocoa/hover_button.h
+++ b/ui/base/cocoa/hover_button.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/tracking_area.h"
#import "ui/base/ui_export.h"
diff --git a/ui/base/cocoa/hover_button.mm b/ui/base/cocoa/hover_button.mm
index a234898..bfe0139 100644
--- a/ui/base/cocoa/hover_button.mm
+++ b/ui/base/cocoa/hover_button.mm
@@ -44,7 +44,7 @@
// it can be freed while |super mouseDown:| is in its loop, and the
// |checkImageState| call will crash.
// http://crbug.com/28220
- scoped_nsobject<HoverButton> myself([self retain]);
+ base::scoped_nsobject<HoverButton> myself([self retain]);
[super mouseDown:theEvent];
// We need to check the image state after the mouseDown event loop finishes.
diff --git a/ui/base/cocoa/hover_image_button.h b/ui/base/cocoa/hover_image_button.h
index 42e0954..d43a7fa 100644
--- a/ui/base/cocoa/hover_image_button.h
+++ b/ui/base/cocoa/hover_image_button.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/hover_button.h"
#include "ui/base/ui_export.h"
@@ -15,9 +15,9 @@
UI_EXPORT
@interface HoverImageButton : HoverButton {
@private
- scoped_nsobject<NSImage> defaultImage_;
- scoped_nsobject<NSImage> hoverImage_;
- scoped_nsobject<NSImage> pressedImage_;
+ base::scoped_nsobject<NSImage> defaultImage_;
+ base::scoped_nsobject<NSImage> hoverImage_;
+ base::scoped_nsobject<NSImage> pressedImage_;
}
// Sets the default image.
diff --git a/ui/base/cocoa/hover_image_button_unittest.mm b/ui/base/cocoa/hover_image_button_unittest.mm
index b8b5c37..cc1cca0 100644
--- a/ui/base/cocoa/hover_image_button_unittest.mm
+++ b/ui/base/cocoa/hover_image_button_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/base/cocoa/hover_image_button.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
namespace {
@@ -13,7 +13,7 @@ class HoverImageButtonTest : public ui::CocoaTest {
public:
HoverImageButtonTest() {
NSRect content_frame = [[test_window() contentView] frame];
- scoped_nsobject<HoverImageButton> button(
+ base::scoped_nsobject<HoverImageButton> button(
[[HoverImageButton alloc] initWithFrame:content_frame]);
button_ = button.get();
[[test_window() contentView] addSubview:button_];
diff --git a/ui/base/cocoa/menu_controller.h b/ui/base/cocoa/menu_controller.h
index 19ccea2..a856404 100644
--- a/ui/base/cocoa/menu_controller.h
+++ b/ui/base/cocoa/menu_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "ui/base/ui_export.h"
@@ -25,7 +25,7 @@ UI_EXPORT
@interface MenuController : NSObject<NSMenuDelegate> {
@protected
ui::MenuModel* model_; // weak
- scoped_nsobject<NSMenu> menu_;
+ base::scoped_nsobject<NSMenu> menu_;
BOOL useWithPopUpButtonCell_; // If YES, 0th item is blank
BOOL isMenuOpen_;
}
diff --git a/ui/base/cocoa/menu_controller.mm b/ui/base/cocoa/menu_controller.mm
index cacb9b2..11792849 100644
--- a/ui/base/cocoa/menu_controller.mm
+++ b/ui/base/cocoa/menu_controller.mm
@@ -107,7 +107,7 @@
label16 = [MenuController elideMenuTitle:label16 toWidth:maxWidth];
NSString* label = l10n_util::FixUpWindowsStyleLabel(label16);
- scoped_nsobject<NSMenuItem> item(
+ base::scoped_nsobject<NSMenuItem> item(
[[NSMenuItem alloc] initWithTitle:label
action:@selector(itemSelected:)
keyEquivalent:@""]);
@@ -184,7 +184,7 @@
NSDictionary *attributes =
[NSDictionary dictionaryWithObject:font->GetNativeFont()
forKey:NSFontAttributeName];
- scoped_nsobject<NSAttributedString> title(
+ base::scoped_nsobject<NSAttributedString> title(
[[NSAttributedString alloc] initWithString:[(id)item title]
attributes:attributes]);
[(id)item setAttributedTitle:title.get()];
@@ -217,7 +217,7 @@
// complicate creation logic, and since the tags are model indexes, they
// are unaffected by the extra item.
if (useWithPopUpButtonCell_) {
- scoped_nsobject<NSMenuItem> blankItem(
+ base::scoped_nsobject<NSMenuItem> blankItem(
[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]);
[menu_ insertItem:blankItem atIndex:0];
}
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm
index 507f5fe..f4cdf0f 100644
--- a/ui/base/cocoa/menu_controller_unittest.mm
+++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -130,7 +130,7 @@ class FontMenuModel : public SimpleMenuModel {
TEST_F(MenuControllerTest, EmptyMenu) {
Delegate delegate;
SimpleMenuModel model(&delegate);
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 0);
}
@@ -145,7 +145,7 @@ TEST_F(MenuControllerTest, BasicCreation) {
model.AddItem(4, ASCIIToUTF16("four"));
model.AddItem(5, ASCIIToUTF16("five"));
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 6);
@@ -171,7 +171,7 @@ TEST_F(MenuControllerTest, Submenus) {
model.AddSubMenuWithStringId(5, kTestLabelResourceId, &submodel);
model.AddItem(6, ASCIIToUTF16("three"));
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 3);
@@ -204,7 +204,7 @@ TEST_F(MenuControllerTest, EmptySubmenu) {
SimpleMenuModel submodel(&delegate);
model.AddSubMenuWithStringId(2, kTestLabelResourceId, &submodel);
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 2);
}
@@ -218,7 +218,7 @@ TEST_F(MenuControllerTest, PopUpButton) {
// Menu should have an extra item inserted at position 0 that has an empty
// title.
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:YES]);
EXPECT_EQ([[menu menu] numberOfItems], 4);
EXPECT_EQ(base::SysNSStringToUTF16([[[menu menu] itemAtIndex:0] title]),
@@ -233,7 +233,7 @@ TEST_F(MenuControllerTest, Execute) {
Delegate delegate;
SimpleMenuModel model(&delegate);
model.AddItem(1, ASCIIToUTF16("one"));
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 1);
@@ -262,7 +262,7 @@ TEST_F(MenuControllerTest, Validate) {
submodel.AddItem(2, ASCIIToUTF16("sub-one"));
model.AddSubMenuWithStringId(3, kTestLabelResourceId, &submodel);
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 3);
@@ -277,7 +277,7 @@ TEST_F(MenuControllerTest, LabelFont) {
model.AddItem(1, ASCIIToUTF16("one"));
model.AddItem(2, ASCIIToUTF16("two"));
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 2);
@@ -294,7 +294,7 @@ TEST_F(MenuControllerTest, DefaultInitializer) {
model.AddItem(2, ASCIIToUTF16("two"));
model.AddItem(3, ASCIIToUTF16("three"));
- scoped_nsobject<MenuController> menu([[MenuController alloc] init]);
+ base::scoped_nsobject<MenuController> menu([[MenuController alloc] init]);
EXPECT_FALSE([menu menu]);
[menu setModel:&model];
@@ -317,7 +317,7 @@ TEST_F(MenuControllerTest, Dynamic) {
delegate.SetDynamicLabel(initial);
SimpleMenuModel model(&delegate);
model.AddItem(1, ASCIIToUTF16("foo"));
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
EXPECT_EQ([[menu menu] numberOfItems], 1);
// Validate() simulates opening the menu - the item label/icon should be
@@ -359,7 +359,7 @@ TEST_F(MenuControllerTest, OpenClose) {
model.AddItem(3, ASCIIToUTF16("bf"));
// Create the controller.
- scoped_nsobject<MenuController> menu(
+ base::scoped_nsobject<MenuController> menu(
[[MenuController alloc] initWithModel:&model useWithPopUpButtonCell:NO]);
delegate.menu_to_close_ = [menu menu];
diff --git a/ui/base/cocoa/nib_loading.mm b/ui/base/cocoa/nib_loading.mm
index 9430a76..dd0eb48 100644
--- a/ui/base/cocoa/nib_loading.mm
+++ b/ui/base/cocoa/nib_loading.mm
@@ -5,12 +5,12 @@
#import "ui/base/cocoa/nib_loading.h"
#include "base/mac/bundle_locations.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
namespace ui {
NSView* GetViewFromNib(NSString* name) {
- scoped_nsobject<NSNib> nib(
+ base::scoped_nsobject<NSNib> nib(
[[NSNib alloc] initWithNibNamed:name
bundle:base::mac::FrameworkBundle()]);
if (!nib)
diff --git a/ui/base/cocoa/nsgraphics_context_additions_unittest.mm b/ui/base/cocoa/nsgraphics_context_additions_unittest.mm
index 6c69b85..d4e958e 100644
--- a/ui/base/cocoa/nsgraphics_context_additions_unittest.mm
+++ b/ui/base/cocoa/nsgraphics_context_additions_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/base/cocoa/nsgraphics_context_additions.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
typedef ui::CocoaTest NSGraphicsContextCrAdditionsTest;
@@ -12,7 +12,7 @@ typedef ui::CocoaTest NSGraphicsContextCrAdditionsTest;
// Test fails, see http://crbug.com/249241
TEST_F(NSGraphicsContextCrAdditionsTest, DISABLED_PatternPhase) {
NSRect frame = NSMakeRect(50, 50, 100, 100);
- scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
+ base::scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:frame]);
[[test_window() contentView] addSubview:view];
[view lockFocus];
diff --git a/ui/base/cocoa/tracking_area.h b/ui/base/cocoa/tracking_area.h
index 2800bc2..782cdae 100644
--- a/ui/base/cocoa/tracking_area.h
+++ b/ui/base/cocoa/tracking_area.h
@@ -7,7 +7,7 @@
#import <AppKit/AppKit.h>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/ui_export.h"
@class CrTrackingAreaOwnerProxy;
@@ -17,7 +17,7 @@
UI_EXPORT
@interface CrTrackingArea : NSTrackingArea {
@private
- scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy_;
+ base::scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy_;
}
// Designated initializer. Forwards all arguments to the superclass, but wraps
@@ -56,7 +56,7 @@ class UI_EXPORT ScopedCrTrackingArea {
CrTrackingArea* get() const;
private:
- scoped_nsobject<CrTrackingArea> tracking_area_;
+ base::scoped_nsobject<CrTrackingArea> tracking_area_;
DISALLOW_COPY_AND_ASSIGN(ScopedCrTrackingArea);
};
diff --git a/ui/base/cocoa/tracking_area.mm b/ui/base/cocoa/tracking_area.mm
index 474d120..a137794 100644
--- a/ui/base/cocoa/tracking_area.mm
+++ b/ui/base/cocoa/tracking_area.mm
@@ -71,7 +71,7 @@
options:(NSTrackingAreaOptions)options
owner:(id)owner
userInfo:(NSDictionary*)userInfo {
- scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy(
+ base::scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy(
[[CrTrackingAreaOwnerProxy alloc] initWithOwner:owner]);
if ((self = [super initWithRect:rect
options:options
diff --git a/ui/base/cocoa/tracking_area_unittest.mm b/ui/base/cocoa/tracking_area_unittest.mm
index 487aa89..b12c9d4 100644
--- a/ui/base/cocoa/tracking_area_unittest.mm
+++ b/ui/base/cocoa/tracking_area_unittest.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/tracking_area.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
@@ -35,8 +35,8 @@ class CrTrackingAreaTest : public CocoaTest {
userInfo:nil]) {
}
- scoped_nsobject<TestTrackingAreaOwner> owner_;
- scoped_nsobject<CrTrackingArea> trackingArea_;
+ base::scoped_nsobject<TestTrackingAreaOwner> owner_;
+ base::scoped_nsobject<CrTrackingArea> trackingArea_;
};
TEST_F(CrTrackingAreaTest, OwnerForwards) {
diff --git a/ui/base/cocoa/underlay_opengl_hosting_window.mm b/ui/base/cocoa/underlay_opengl_hosting_window.mm
index 3069bd2..1e562e2 100644
--- a/ui/base/cocoa/underlay_opengl_hosting_window.mm
+++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
@interface NSWindow (UndocumentedAPI)
// Normally, punching a hole in a window by painting a subview with a
@@ -121,17 +121,21 @@ NSComparisonResult OpaqueViewsOnTop(id view1, id view2, void* context) {
const CGFloat kTopEdgeInset = 16;
const CGFloat kAlphaValueJustOpaqueEnough = 0.005;
- scoped_nsobject<NSView> leftOpaque([[OpaqueView alloc] initWithFrame:
- NSMakeRect(NSMinX(rootBounds), NSMinY(rootBounds),
- 1, NSHeight(rootBounds) - kTopEdgeInset)]);
+ base::scoped_nsobject<NSView> leftOpaque([[OpaqueView alloc]
+ initWithFrame:NSMakeRect(NSMinX(rootBounds),
+ NSMinY(rootBounds),
+ 1,
+ NSHeight(rootBounds) - kTopEdgeInset)]);
[leftOpaque setAutoresizingMask:NSViewMaxXMargin |
NSViewHeightSizable];
[leftOpaque setAlphaValue:kAlphaValueJustOpaqueEnough];
[rootView addSubview:leftOpaque];
- scoped_nsobject<NSView> rightOpaque([[OpaqueView alloc] initWithFrame:
- NSMakeRect(NSMaxX(rootBounds) - 1, NSMinY(rootBounds),
- 1, NSHeight(rootBounds) - kTopEdgeInset)]);
+ base::scoped_nsobject<NSView> rightOpaque([[OpaqueView alloc]
+ initWithFrame:NSMakeRect(NSMaxX(rootBounds) - 1,
+ NSMinY(rootBounds),
+ 1,
+ NSHeight(rootBounds) - kTopEdgeInset)]);
[rightOpaque setAutoresizingMask:NSViewMinXMargin |
NSViewHeightSizable];
[rightOpaque setAlphaValue:kAlphaValueJustOpaqueEnough];
diff --git a/ui/base/resource/resource_bundle_ios.mm b/ui/base/resource/resource_bundle_ios.mm
index d9f1fb5..e054802 100644
--- a/ui/base/resource/resource_bundle_ios.mm
+++ b/ui/base/resource/resource_bundle_ios.mm
@@ -12,10 +12,10 @@
#include "base/files/file_path.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/scoped_nsobject.h"
-#include "base/synchronization/lock.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/synchronization/lock.h"
#include "ui/base/resource/resource_handle.h"
#include "ui/gfx/image/image.h"
@@ -120,14 +120,14 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
}
// Create a data object from the raw bytes.
- scoped_nsobject<NSData> ns_data(
+ base::scoped_nsobject<NSData> ns_data(
[[NSData alloc] initWithBytes:data->front() length:data->size()]);
bool is_fallback = PNGContainsFallbackMarker(data->front(), data->size());
// Create the image from the data.
CGFloat target_scale = ui::GetScaleFactorScale(scale_factor);
CGFloat source_scale = is_fallback ? 1.0 : target_scale;
- scoped_nsobject<UIImage> ui_image(
+ base::scoped_nsobject<UIImage> ui_image(
[[UIImage alloc] initWithData:ns_data scale:source_scale]);
// If the image is a 1x fallback, scale it up to a full-size representation.
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
index 28e1ee8..79f834f 100644
--- a/ui/base/resource/resource_bundle_mac.mm
+++ b/ui/base/resource/resource_bundle_mac.mm
@@ -11,8 +11,8 @@
#include "base/files/file_path.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/synchronization/lock.h"
#include "ui/base/resource/resource_handle.h"
@@ -119,16 +119,15 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
image = delegate_->GetNativeImageNamed(resource_id, rtl);
if (image.IsEmpty()) {
- scoped_nsobject<NSImage> ns_image;
+ base::scoped_nsobject<NSImage> ns_image;
for (size_t i = 0; i < data_packs_.size(); ++i) {
scoped_refptr<base::RefCountedStaticMemory> data(
data_packs_[i]->GetStaticMemory(resource_id));
if (!data.get())
continue;
- scoped_nsobject<NSData> ns_data(
- [[NSData alloc] initWithBytes:data->front()
- length:data->size()]);
+ base::scoped_nsobject<NSData> ns_data(
+ [[NSData alloc] initWithBytes:data->front() length:data->size()]);
if (!ns_image.get()) {
ns_image.reset([[NSImage alloc] initWithData:ns_data]);
} else {
diff --git a/ui/base/test/ui_cocoa_test_helper.h b/ui/base/test/ui_cocoa_test_helper.h
index ff24a2f..79e37e2 100644
--- a/ui/base/test/ui_cocoa_test_helper.h
+++ b/ui/base/test/ui_cocoa_test_helper.h
@@ -106,15 +106,15 @@ class CocoaTest : public PlatformTest {
// displaying the view to make sure it won't crash, as well as removing it
// from a window. All tests that work with NSView subclasses and/or
// NSViewController subclasses should use it.
-#define TEST_VIEW(test_fixture, test_view) \
+#define TEST_VIEW(test_fixture, test_view) \
TEST_F(test_fixture, test_fixture##_TestViewMacroAddRemove) { \
- scoped_nsobject<NSView> view([test_view retain]); \
- EXPECT_EQ([test_window() contentView], [view superview]); \
- [view removeFromSuperview]; \
- EXPECT_FALSE([view superview]); \
- } \
- TEST_F(test_fixture, test_fixture##_TestViewMacroDisplay) { \
- [test_view display]; \
+ base::scoped_nsobject<NSView> view([test_view retain]); \
+ EXPECT_EQ([test_window() contentView], [view superview]); \
+ [view removeFromSuperview]; \
+ EXPECT_FALSE([view superview]); \
+ } \
+ TEST_F(test_fixture, test_fixture##_TestViewMacroDisplay) { \
+ [test_view display]; \
}
// A macro which determines the proper float epsilon for a CGFloat.
diff --git a/ui/compositor/test/test_compositor_host_mac.mm b/ui/compositor/test/test_compositor_host_mac.mm
index 02c3ed6..3debc02 100644
--- a/ui/compositor/test/test_compositor_host_mac.mm
+++ b/ui/compositor/test/test_compositor_host_mac.mm
@@ -11,7 +11,7 @@
#import <Foundation/NSAutoreleasePool.h>
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/rect.h"
@@ -126,7 +126,8 @@ void TestCompositorHostMac::Show() {
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
- scoped_nsobject<AcceleratedTestView> view([[AcceleratedTestView alloc] init]);
+ base::scoped_nsobject<AcceleratedTestView> view(
+ [[AcceleratedTestView alloc] init]);
compositor_.reset(new ui::Compositor(this, view, bounds_.size()));
[view setCompositor:compositor_.get()];
[window_ setContentView:view];
diff --git a/ui/gfx/image/image_ios.mm b/ui/gfx/image/image_ios.mm
index e2ff8dc..01a3c87 100644
--- a/ui/gfx/image/image_ios.mm
+++ b/ui/gfx/image/image_ios.mm
@@ -4,13 +4,13 @@
#include "ui/gfx/image/image.h"
+#import <UIKit/UIKit.h>
#include <cmath>
#include <limits>
-#import <UIKit/UIKit.h>
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/base/layout.h"
#include "ui/gfx/image/image_png_rep.h"
#include "ui/gfx/image/image_skia.h"
@@ -117,8 +117,8 @@ ImageSkia* ImageSkiaFromPNG(
// through UIImage.
gfx::ImageSkia* image_skia = new gfx::ImageSkia();
for (size_t i = 0; i < image_png_reps.size(); ++i) {
- scoped_nsobject<UIImage> uiimage(CreateUIImageFromImagePNGRep(
- image_png_reps[i]));
+ base::scoped_nsobject<UIImage> uiimage(
+ CreateUIImageFromImagePNGRep(image_png_reps[i]));
gfx::ImageSkiaRep image_skia_rep = ImageSkiaRepOfScaleFactorFromUIImage(
uiimage, image_png_reps[i].scale_factor);
if (!image_skia_rep.is_null())
diff --git a/ui/gfx/image/image_mac.mm b/ui/gfx/image/image_mac.mm
index 0158521..d03b48e 100644
--- a/ui/gfx/image/image_mac.mm
+++ b/ui/gfx/image/image_mac.mm
@@ -7,7 +7,7 @@
#import <AppKit/AppKit.h>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/gfx/image/image_png_rep.h"
#include "ui/gfx/size.h"
@@ -36,7 +36,7 @@ scoped_refptr<base::RefCountedMemory> Get1xPNGBytesFromNSImage(
CGImageRef cg_image = [nsimage CGImageForProposedRect:NULL
context:nil
hints:nil];
- scoped_nsobject<NSBitmapImageRep> ns_bitmap(
+ base::scoped_nsobject<NSBitmapImageRep> ns_bitmap(
[[NSBitmapImageRep alloc] initWithCGImage:cg_image]);
NSData* ns_data = [ns_bitmap representationUsingType:NSPNGFileType
properties:nil];
@@ -55,13 +55,13 @@ NSImage* NSImageFromPNG(const std::vector<gfx::ImagePNGRep>& image_png_reps,
return GetErrorNSImage();
}
- scoped_nsobject<NSImage> image;
+ base::scoped_nsobject<NSImage> image;
for (size_t i = 0; i < image_png_reps.size(); ++i) {
scoped_refptr<base::RefCountedMemory> png = image_png_reps[i].raw_data;
CHECK(png.get());
- scoped_nsobject<NSData> ns_data(
+ base::scoped_nsobject<NSData> ns_data(
[[NSData alloc] initWithBytes:png->front() length:png->size()]);
- scoped_nsobject<NSBitmapImageRep> ns_image_rep(
+ base::scoped_nsobject<NSBitmapImageRep> ns_image_rep(
[[NSBitmapImageRep alloc] initWithData:ns_data]);
if (!ns_image_rep) {
LOG(ERROR) << "Unable to decode PNG at "
@@ -78,7 +78,7 @@ NSImage* NSImageFromPNG(const std::vector<gfx::ImagePNGRep>& image_png_reps,
[[ns_image_rep colorSpace] CGColorSpace]);
CGColorSpaceModel color_space_model = CGColorSpaceGetModel(color_space);
if (decoded_color_space_model == color_space_model) {
- scoped_nsobject<NSColorSpace> ns_color_space(
+ base::scoped_nsobject<NSColorSpace> ns_color_space(
[[NSColorSpace alloc] initWithCGColorSpace:color_space]);
NSBitmapImageRep* ns_retagged_image_rep =
[ns_image_rep
diff --git a/ui/gfx/image/image_mac_unittest.mm b/ui/gfx/image/image_mac_unittest.mm
index 7a0c3eb..250deeb 100644
--- a/ui/gfx/image/image_mac_unittest.mm
+++ b/ui/gfx/image/image_mac_unittest.mm
@@ -5,7 +5,7 @@
#include <Cocoa/Cocoa.h>
#include "base/logging.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_png_rep.h"
@@ -99,7 +99,7 @@ TEST_F(ImageMacTest, MultiResolutionNSImageToImageSkia) {
BitmapImageRep(kWidth1x, kHeight1x, &ns_image_rep1);
NSBitmapImageRep* ns_image_rep2;
BitmapImageRep(kWidth2x, kHeight2x, &ns_image_rep2);
- scoped_nsobject<NSImage> ns_image(
+ base::scoped_nsobject<NSImage> ns_image(
[[NSImage alloc] initWithSize:NSMakeSize(kWidth1x, kHeight1x)]);
[ns_image addRepresentation:ns_image_rep1];
[ns_image addRepresentation:ns_image_rep2];
@@ -131,7 +131,7 @@ TEST_F(ImageMacTest, UnalignedMultiResolutionNSImageToImageSkia) {
NSBitmapImageRep* ns_image_rep4;
BitmapImageRep(kWidth4x, kHeight4x, &ns_image_rep4);
- scoped_nsobject<NSImage> ns_image(
+ base::scoped_nsobject<NSImage> ns_image(
[[NSImage alloc] initWithSize:NSMakeSize(kWidth1x, kHeight1x)]);
[ns_image addRepresentation:ns_image_rep4];
diff --git a/ui/gfx/image/image_skia_util_mac.mm b/ui/gfx/image/image_skia_util_mac.mm
index 226953b..f9d0475 100644
--- a/ui/gfx/image/image_skia_util_mac.mm
+++ b/ui/gfx/image/image_skia_util_mac.mm
@@ -10,7 +10,7 @@
#import <AppKit/AppKit.h>
#include "base/mac/mac_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -89,7 +89,7 @@ NSImage* NSImageFromImageSkia(const gfx::ImageSkia& image_skia) {
if (image_skia.isNull())
return nil;
- scoped_nsobject<NSImage> image([[NSImage alloc] init]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc] init]);
image_skia.EnsureRepsForSupportedScaleFactors();
std::vector<gfx::ImageSkiaRep> image_reps = image_skia.image_reps();
for (std::vector<gfx::ImageSkiaRep>::const_iterator it = image_reps.begin();
@@ -107,7 +107,7 @@ NSImage* NSImageFromImageSkiaWithColorSpace(const gfx::ImageSkia& image_skia,
if (image_skia.isNull())
return nil;
- scoped_nsobject<NSImage> image([[NSImage alloc] init]);
+ base::scoped_nsobject<NSImage> image([[NSImage alloc] init]);
image_skia.EnsureRepsForSupportedScaleFactors();
std::vector<gfx::ImageSkiaRep> image_reps = image_skia.image_reps();
for (std::vector<gfx::ImageSkiaRep>::const_iterator it = image_reps.begin();
diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
index eff0c0f..bf0c0bd 100644
--- a/ui/gfx/platform_font_mac.mm
+++ b/ui/gfx/platform_font_mac.mm
@@ -7,7 +7,7 @@
#include <Cocoa/Cocoa.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/canvas.h"
@@ -124,7 +124,7 @@ void PlatformFontMac::InitWithNameSizeAndStyle(const std::string& font_name,
void PlatformFontMac::CalculateMetrics() {
NSFont* font = GetNativeFont();
- scoped_nsobject<NSLayoutManager> layout_manager(
+ base::scoped_nsobject<NSLayoutManager> layout_manager(
[[NSLayoutManager alloc] init]);
height_ = [layout_manager defaultLineHeightForFont:font];
ascent_ = [font ascender];
diff --git a/ui/gl/gl_context_nsview.h b/ui/gl/gl_context_nsview.h
index f4f4df7..5f90738 100644
--- a/ui/gl/gl_context_nsview.h
+++ b/ui/gl/gl_context_nsview.h
@@ -8,7 +8,7 @@
#import <AppKit/NSOpenGL.h>
#include "base/compiler_specific.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/gl/gl_context.h"
namespace gfx {
@@ -36,7 +36,7 @@ class GLContextNSView : public GLContextReal {
void FlushBuffer();
private:
- scoped_nsobject<NSOpenGLContext> context_;
+ base::scoped_nsobject<NSOpenGLContext> context_;
GpuPreference gpu_preference_;
DISALLOW_COPY_AND_ASSIGN(GLContextNSView);
diff --git a/ui/gl/gl_context_nsview.mm b/ui/gl/gl_context_nsview.mm
index 464ca3e..b6146bb 100644
--- a/ui/gl/gl_context_nsview.mm
+++ b/ui/gl/gl_context_nsview.mm
@@ -32,7 +32,7 @@ bool GLContextNSView::Initialize(GLSurface* surface,
attributes.push_back(NSOpenGLPFADoubleBuffer);
attributes.push_back(0);
- scoped_nsobject<NSOpenGLPixelFormat> pixel_format;
+ base::scoped_nsobject<NSOpenGLPixelFormat> pixel_format;
pixel_format.reset([[NSOpenGLPixelFormat alloc]
initWithAttributes:&attributes.front()]);
if (!pixel_format) {
diff --git a/ui/message_center/cocoa/notification_controller.h b/ui/message_center/cocoa/notification_controller.h
index 46965a7..0d3bc9d 100644
--- a/ui/message_center/cocoa/notification_controller.h
+++ b/ui/message_center/cocoa/notification_controller.h
@@ -9,7 +9,7 @@
#include <string>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "ui/message_center/message_center_export.h"
namespace message_center {
@@ -35,22 +35,22 @@ MESSAGE_CENTER_EXPORT
message_center::MessageCenter* messageCenter_;
// The button that invokes |-close:|, in the upper-right corner.
- scoped_nsobject<HoverImageButton> closeButton_;
+ base::scoped_nsobject<HoverImageButton> closeButton_;
// The large icon associated with the notification, on the left side.
- scoped_nsobject<NSImageView> icon_;
+ base::scoped_nsobject<NSImageView> icon_;
// The title of the message.
- scoped_nsobject<NSTextField> title_;
+ base::scoped_nsobject<NSTextField> title_;
// Body text of the message.
- scoped_nsobject<NSTextField> message_;
+ base::scoped_nsobject<NSTextField> message_;
// Container for optional list item views.
- scoped_nsobject<NSView> listItemView_;
+ base::scoped_nsobject<NSView> listItemView_;
// Container for optional items at the bottom of the notification.
- scoped_nsobject<NSView> bottomView_;
+ base::scoped_nsobject<NSView> bottomView_;
}
// Creates a new controller for a given notification.
diff --git a/ui/message_center/cocoa/notification_controller.mm b/ui/message_center/cocoa/notification_controller.mm
index 87b4a8f..afea9e6 100644
--- a/ui/message_center/cocoa/notification_controller.mm
+++ b/ui/message_center/cocoa/notification_controller.mm
@@ -207,9 +207,8 @@
NSRect rootFrame = NSMakeRect(0, 0,
message_center::kNotificationPreferredImageSize,
message_center::kNotificationIconSize);
- scoped_nsobject<MCNotificationView> rootView(
- [[MCNotificationView alloc] initWithController:self
- frame:rootFrame]);
+ base::scoped_nsobject<MCNotificationView> rootView(
+ [[MCNotificationView alloc] initWithController:self frame:rootFrame]);
[self configureCustomBox:rootView];
[rootView setFillColor:gfx::SkColorToCalibratedNSColor(
message_center::kNotificationBackgroundColor)];
@@ -346,9 +345,9 @@
NSRect buttonFrame = frame;
buttonFrame.origin = NSMakePoint(0, y);
buttonFrame.size.height = message_center::kButtonHeight;
- scoped_nsobject<NSButton> button(
+ base::scoped_nsobject<NSButton> button(
[[NSButton alloc] initWithFrame:buttonFrame]);
- scoped_nsobject<MCNotificationButtonCell> cell(
+ base::scoped_nsobject<MCNotificationButtonCell> cell(
[[MCNotificationButtonCell alloc]
initTextCell:base::SysUTF16ToNSString(buttonInfo.title)]);
[cell setShowsBorderOnlyWhileMouseInside:YES];
@@ -366,7 +365,7 @@
NSRect separatorFrame = frame;
separatorFrame.origin = NSMakePoint(0, y);
separatorFrame.size.height = 1;
- scoped_nsobject<NSBox> separator(
+ base::scoped_nsobject<NSBox> separator(
[[AccessibilityIgnoredBox alloc] initWithFrame:separatorFrame]);
[self configureCustomBox:separator];
[separator setFillColor:gfx::SkColorToCalibratedNSColor(
@@ -383,7 +382,7 @@
imageFrame.origin = NSMakePoint(0, y);
imageFrame.size = NSSizeFromCGSize(message_center::GetImageSizeForWidth(
NSWidth(frame), notification->image().Size()).ToCGSize());
- scoped_nsobject<NSImageView> imageView(
+ base::scoped_nsobject<NSImageView> imageView(
[[NSImageView alloc] initWithFrame:imageFrame]);
[imageView setImage:image];
[imageView setImageScaling:NSImageScaleProportionallyUpOrDown];
@@ -440,7 +439,7 @@
NSMutableAttributedString* formattedText =
[[[NSMutableAttributedString alloc] initWithString:text] autorelease];
- scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
+ base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
[[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
[paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
NSDictionary* sharedAttribs = @{
@@ -481,7 +480,7 @@
NSRect imageFrame = NSMakeRect(0, 0,
message_center::kNotificationIconSize,
message_center::kNotificationIconSize);
- scoped_nsobject<NSBox> imageBox(
+ base::scoped_nsobject<NSBox> imageBox(
[[AccessibilityIgnoredBox alloc] initWithFrame:imageFrame]);
[self configureCustomBox:imageBox];
[imageBox setFillColor:gfx::SkColorToCalibratedNSColor(
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 219ae54..6155aff 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -5,7 +5,7 @@
#import "ui/message_center/cocoa/notification_controller.h"
#include "base/mac/foundation_util.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -110,7 +110,7 @@ TEST_F(NotificationControllerTest, BasicLayout) {
NULL));
notification->set_icon(gfx::Image([TestIcon() retain]));
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:NULL]);
[controller view];
@@ -138,7 +138,7 @@ TEST_F(NotificationControllerTest, OverflowText) {
std::string(),
message_center::RichNotificationData(),
NULL));
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:NULL]);
[controller view];
@@ -161,7 +161,7 @@ TEST_F(NotificationControllerTest, Close) {
NULL));
MockMessageCenter message_center;
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:&message_center]);
[controller view];
@@ -186,7 +186,7 @@ TEST_F(NotificationControllerTest, Update) {
std::string(),
message_center::RichNotificationData(),
NULL));
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:NULL]);
@@ -224,7 +224,7 @@ TEST_F(NotificationControllerTest, Buttons) {
NULL));
MockMessageCenter message_center;
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:&message_center]);
[controller view];
@@ -252,7 +252,7 @@ TEST_F(NotificationControllerTest, Image) {
MockMessageCenter message_center;
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:&message_center]);
[controller view];
@@ -286,7 +286,7 @@ TEST_F(NotificationControllerTest, List) {
NULL));
MockMessageCenter message_center;
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc] initWithNotification:notification.get()
messageCenter:&message_center]);
[controller view];
diff --git a/ui/message_center/cocoa/popup_collection.h b/ui/message_center/cocoa/popup_collection.h
index af06bf5e..806114b 100644
--- a/ui/message_center/cocoa/popup_collection.h
+++ b/ui/message_center/cocoa/popup_collection.h
@@ -10,7 +10,7 @@
#include <set>
#include "base/mac/scoped_block.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "base/memory/scoped_ptr.h"
#include "ui/message_center/message_center_export.h"
@@ -37,11 +37,11 @@ MESSAGE_CENTER_EXPORT
scoped_ptr<message_center::MessageCenterObserver> observer_;
// Array of all on-screen popup notifications.
- scoped_nsobject<NSMutableArray> popups_;
+ base::scoped_nsobject<NSMutableArray> popups_;
// Array of all on-screen popup notifications that are being faded out
// for removal.
- scoped_nsobject<NSMutableArray> popupsBeingRemoved_;
+ base::scoped_nsobject<NSMutableArray> popupsBeingRemoved_;
// For testing only. If not a zero rect, this is the screen size to use
// for laying out popups.
diff --git a/ui/message_center/cocoa/popup_collection_unittest.mm b/ui/message_center/cocoa/popup_collection_unittest.mm
index 2375d03..36876ac 100644
--- a/ui/message_center/cocoa/popup_collection_unittest.mm
+++ b/ui/message_center/cocoa/popup_collection_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/message_center/cocoa/popup_collection.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/run_loop.h"
@@ -111,7 +111,7 @@ class PopupCollectionTest : public ui::CocoaTest {
base::MessageLoop message_loop_;
scoped_ptr<base::RunLoop> nested_run_loop_;
message_center::MessageCenter* center_;
- scoped_nsobject<MCPopupCollection> collection_;
+ base::scoped_nsobject<MCPopupCollection> collection_;
};
TEST_F(PopupCollectionTest, AddThreeCloseOne) {
diff --git a/ui/message_center/cocoa/popup_controller.h b/ui/message_center/cocoa/popup_controller.h
index 283a463..47a052d 100644
--- a/ui/message_center/cocoa/popup_controller.h
+++ b/ui/message_center/cocoa/popup_controller.h
@@ -9,7 +9,7 @@
#include <string>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#import "ui/base/cocoa/tracking_area.h"
#include "ui/message_center/message_center_export.h"
@@ -34,7 +34,7 @@ MESSAGE_CENTER_EXPORT
MCPopupCollection* popupCollection_;
// The view controller that provide's the popup content view.
- scoped_nsobject<MCNotificationController> notificationController_;
+ base::scoped_nsobject<MCNotificationController> notificationController_;
// If the swipe-away gesture received NSEventPhaseEnded.
BOOL swipeGestureEnded_;
@@ -51,7 +51,7 @@ MESSAGE_CENTER_EXPORT
NSRect bounds_;
// Used to play animation when the popup shows, changes bounds and closes.
- scoped_nsobject<NSViewAnimation> boundsAnimation_;
+ base::scoped_nsobject<NSViewAnimation> boundsAnimation_;
// Used to track the popup for mouse entered and exited events.
ui::ScopedCrTrackingArea trackingArea_;
diff --git a/ui/message_center/cocoa/popup_controller.mm b/ui/message_center/cocoa/popup_controller.mm
index 496e08a..30badc7 100644
--- a/ui/message_center/cocoa/popup_controller.mm
+++ b/ui/message_center/cocoa/popup_controller.mm
@@ -97,12 +97,12 @@ enum {
- (id)initWithNotification:(const message_center::Notification*)notification
messageCenter:(message_center::MessageCenter*)messageCenter
popupCollection:(MCPopupCollection*)popupCollection {
- scoped_nsobject<MCPopupWindow> window(
+ base::scoped_nsobject<MCPopupWindow> window(
[[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
- styleMask:NSBorderlessWindowMask |
- NSNonactivatingPanelMask
- backing:NSBackingStoreBuffered
- defer:YES]);
+ styleMask:NSBorderlessWindowMask |
+ NSNonactivatingPanelMask
+ backing:NSBackingStoreBuffered
+ defer:YES]);
if ((self = [super initWithWindow:window])) {
messageCenter_ = messageCenter;
popupCollection_ = popupCollection;
diff --git a/ui/message_center/cocoa/popup_controller_unittest.mm b/ui/message_center/cocoa/popup_controller_unittest.mm
index f1b28e5..41f6279 100644
--- a/ui/message_center/cocoa/popup_controller_unittest.mm
+++ b/ui/message_center/cocoa/popup_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/message_center/cocoa/popup_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -27,7 +27,7 @@ TEST_F(PopupControllerTest, Creation) {
message_center::RichNotificationData(),
NULL));
- scoped_nsobject<MCPopupController> controller(
+ base::scoped_nsobject<MCPopupController> controller(
[[MCPopupController alloc] initWithNotification:notification.get()
messageCenter:nil
popupCollection:nil]);
diff --git a/ui/message_center/cocoa/settings_controller.h b/ui/message_center/cocoa/settings_controller.h
index 1ae11c7..2029f6b 100644
--- a/ui/message_center/cocoa/settings_controller.h
+++ b/ui/message_center/cocoa/settings_controller.h
@@ -7,7 +7,7 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "ui/message_center/message_center_export.h"
#include "ui/message_center/notifier_settings.h"
@@ -45,13 +45,13 @@ MESSAGE_CENTER_EXPORT
message_center::NotifierSettingsProvider* provider_;
// The "Settings" text at the top.
- scoped_nsobject<NSTextField> settingsText_;
+ base::scoped_nsobject<NSTextField> settingsText_;
// The smaller text below the "Settings" text.
- scoped_nsobject<NSTextField> detailsText_;
+ base::scoped_nsobject<NSTextField> detailsText_;
// Container for all the checkboxes.
- scoped_nsobject<NSScrollView> scrollView_;
+ base::scoped_nsobject<NSScrollView> scrollView_;
std::vector<message_center::Notifier*> notifiers_;
}
diff --git a/ui/message_center/cocoa/settings_controller.mm b/ui/message_center/cocoa/settings_controller.mm
index 0ae09ec..d606e72 100644
--- a/ui/message_center/cocoa/settings_controller.mm
+++ b/ui/message_center/cocoa/settings_controller.mm
@@ -5,14 +5,14 @@
#import "ui/message_center/cocoa/settings_controller.h"
#include "base/mac/foundation_util.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "grit/ui_strings.h"
+#include "skia/ext/skia_utils_mac.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-#import "base/memory/scoped_nsobject.h"
#import "ui/message_center/cocoa/tray_view_controller.h"
#include "ui/message_center/message_center_style.h"
-#include "skia/ext/skia_utils_mac.h"
const int kMarginWidth = 16;
const int kEntryHeight = 38;
@@ -27,7 +27,7 @@ const int kCorrectedCheckmarkPadding =
@interface MCSettingsButtonCell : NSButtonCell {
// A checkbox's regular image is the checkmark image. This additional image
// is used for the favicon or app icon shown next to the checkmark.
- scoped_nsobject<NSImage> extraImage_;
+ base::scoped_nsobject<NSImage> extraImage_;
}
- (void)setExtraImage:(NSImage*)extraImage;
@end
@@ -150,7 +150,7 @@ void NotifierSettingsObserverMac::UpdateFavicon(const GURL& url,
// Container view.
NSRect fullFrame =
NSMakeRect(0, 0, [MCTrayViewController trayWidth], maxHeight);
- scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:fullFrame]);
+ base::scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:fullFrame]);
[view setBorderType:NSNoBorder];
[view setBoxType:NSBoxCustom];
[view setContentViewMargins:NSZeroSize];
@@ -199,7 +199,7 @@ void NotifierSettingsObserverMac::UpdateFavicon(const GURL& url,
// Document view for the notifier settings.
CGFloat y = 0;
NSRect documentFrame = NSMakeRect(0, 0, NSWidth(fullFrame), 0);
- scoped_nsobject<NSView> documentView(
+ base::scoped_nsobject<NSView> documentView(
[[NSView alloc] initWithFrame:documentFrame]);
for (int i = notifiers_.size() - 1; i >= 0; --i) {
message_center::Notifier* notifier = notifiers_[i];
@@ -207,8 +207,9 @@ void NotifierSettingsObserverMac::UpdateFavicon(const GURL& url,
// TODO(thakis): Use a custom button cell.
NSRect frame = NSMakeRect(
kMarginWidth, y, NSWidth(documentFrame) - kMarginWidth, kEntryHeight);
- scoped_nsobject<NSButton> button([[NSButton alloc] initWithFrame:frame]);
- scoped_nsobject<MCSettingsButtonCell> cell(
+ base::scoped_nsobject<NSButton> button(
+ [[NSButton alloc] initWithFrame:frame]);
+ base::scoped_nsobject<MCSettingsButtonCell> cell(
[[MCSettingsButtonCell alloc]
initTextCell:base::SysUTF16ToNSString(notifier->name)]);
[button setCell:cell];
diff --git a/ui/message_center/cocoa/settings_controller_unittest.mm b/ui/message_center/cocoa/settings_controller_unittest.mm
index 037953c..ca810e6 100644
--- a/ui/message_center/cocoa/settings_controller_unittest.mm
+++ b/ui/message_center/cocoa/settings_controller_unittest.mm
@@ -42,7 +42,7 @@ TEST_F(CocoaTest, Basic) {
FakeNotifierSettingsProvider provider(notifiers);
- scoped_nsobject<MCSettingsController> controller(
+ base::scoped_nsobject<MCSettingsController> controller(
[[MCSettingsController alloc] initWithProvider:&provider]);
[controller view];
@@ -58,7 +58,7 @@ TEST_F(CocoaTest, Toggle) {
FakeNotifierSettingsProvider provider(notifiers);
- scoped_nsobject<MCSettingsController> controller(
+ base::scoped_nsobject<MCSettingsController> controller(
[[MCSettingsController alloc] initWithProvider:&provider]);
[controller view];
diff --git a/ui/message_center/cocoa/status_item_view.h b/ui/message_center/cocoa/status_item_view.h
index 29a26eb..f317dff 100644
--- a/ui/message_center/cocoa/status_item_view.h
+++ b/ui/message_center/cocoa/status_item_view.h
@@ -8,7 +8,7 @@
#import <AppKit/AppKit.h>
#include "base/mac/scoped_block.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/message_center/message_center_export.h"
namespace message_center {
@@ -27,7 +27,7 @@ MESSAGE_CENTER_EXPORT
@interface MCStatusItemView : NSView {
@private
// The status item.
- scoped_nsobject<NSStatusItem> statusItem_;
+ base::scoped_nsobject<NSStatusItem> statusItem_;
// Callback issued when the status item is clicked.
base::mac::ScopedBlock<message_center::StatusItemClickedCallack> callback_;
diff --git a/ui/message_center/cocoa/status_item_view_unittest.mm b/ui/message_center/cocoa/status_item_view_unittest.mm
index 7e9dc45..519fdd5 100644
--- a/ui/message_center/cocoa/status_item_view_unittest.mm
+++ b/ui/message_center/cocoa/status_item_view_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/message_center/cocoa/status_item_view.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
class StatusItemViewTest : public ui::CocoaTest {
@@ -24,7 +24,7 @@ class StatusItemViewTest : public ui::CocoaTest {
}
protected:
- scoped_nsobject<MCStatusItemView> view_;
+ base::scoped_nsobject<MCStatusItemView> view_;
};
// These tests are like TEST_VIEW() but set some of the properties.
diff --git a/ui/message_center/cocoa/tray_controller.h b/ui/message_center/cocoa/tray_controller.h
index 50e94fa..d855cd8 100644
--- a/ui/message_center/cocoa/tray_controller.h
+++ b/ui/message_center/cocoa/tray_controller.h
@@ -8,7 +8,7 @@
#import <AppKit/AppKit.h>
#include "base/basictypes.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/message_center/message_center_export.h"
@class MCTrayViewController;
@@ -25,7 +25,7 @@ MESSAGE_CENTER_EXPORT
message_center::MessageCenterTray* tray_; // Weak, indirectly owns this.
// View controller that provides this window's content.
- scoped_nsobject<MCTrayViewController> viewController_;
+ base::scoped_nsobject<MCTrayViewController> viewController_;
// An event monitor that listens for clicks outside the tray window to cause
// it to close.
diff --git a/ui/message_center/cocoa/tray_controller.mm b/ui/message_center/cocoa/tray_controller.mm
index 33b6e7c..38ca2fd 100644
--- a/ui/message_center/cocoa/tray_controller.mm
+++ b/ui/message_center/cocoa/tray_controller.mm
@@ -29,7 +29,7 @@
@implementation MCTrayController
- (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray {
- scoped_nsobject<MCTrayWindow> window(
+ base::scoped_nsobject<MCTrayWindow> window(
[[MCTrayWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:NSBorderlessWindowMask |
NSNonactivatingPanelMask
diff --git a/ui/message_center/cocoa/tray_controller_unittest.mm b/ui/message_center/cocoa/tray_controller_unittest.mm
index a857bf4..379c3de 100644
--- a/ui/message_center/cocoa/tray_controller_unittest.mm
+++ b/ui/message_center/cocoa/tray_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/message_center/cocoa/tray_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
#include "ui/message_center/message_center.h"
@@ -32,7 +32,7 @@ class TrayControllerTest : public ui::CocoaTest {
protected:
scoped_ptr<message_center::MessageCenterTray> tray_;
- scoped_nsobject<MCTrayController> controller_;
+ base::scoped_nsobject<MCTrayController> controller_;
};
TEST_F(TrayControllerTest, OpenLeftRight) {
diff --git a/ui/message_center/cocoa/tray_view_controller.h b/ui/message_center/cocoa/tray_view_controller.h
index 2446e90..76ce518 100644
--- a/ui/message_center/cocoa/tray_view_controller.h
+++ b/ui/message_center/cocoa/tray_view_controller.h
@@ -12,7 +12,7 @@
#include <string>
#include "base/mac/scoped_block.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "ui/message_center/message_center_export.h"
@class HoverImageButton;
@@ -40,43 +40,43 @@ MESSAGE_CENTER_EXPORT
message_center::MessageCenter* messageCenter_;
// The back button shown while the settings are open.
- scoped_nsobject<HoverImageButton> backButton_;
+ base::scoped_nsobject<HoverImageButton> backButton_;
// The "Notifications" label at the top.
- scoped_nsobject<NSTextField> title_;
+ base::scoped_nsobject<NSTextField> title_;
// The scroll view that contains all the notifications in its documentView.
- scoped_nsobject<NSScrollView> scrollView_;
+ base::scoped_nsobject<NSScrollView> scrollView_;
// The clip view that manages how scrollView_'s documentView is clipped.
- scoped_nsobject<MCClipView> clipView_;
+ base::scoped_nsobject<MCClipView> clipView_;
// Array of MCNotificationController objects, which the array owns.
- scoped_nsobject<NSMutableArray> notifications_;
+ base::scoped_nsobject<NSMutableArray> notifications_;
// Map of notification IDs to weak pointers of the view controllers in
// |notifications_|.
std::map<std::string, MCNotificationController*> notificationsMap_;
// The pause button that enters quiet mode.
- scoped_nsobject<HoverImageButton> pauseButton_;
+ base::scoped_nsobject<HoverImageButton> pauseButton_;
// The clear all notifications button. Hidden when there are no notifications.
- scoped_nsobject<HoverImageButton> clearAllButton_;
+ base::scoped_nsobject<HoverImageButton> clearAllButton_;
// The settings button that shows the settings UI.
- scoped_nsobject<HoverImageButton> settingsButton_;
+ base::scoped_nsobject<HoverImageButton> settingsButton_;
// Array of MCNotificationController objects pending removal by the user.
// The object is owned by the array.
- scoped_nsobject<NSMutableArray> notificationsPendingRemoval_;
+ base::scoped_nsobject<NSMutableArray> notificationsPendingRemoval_;
// Used to animate multiple notifications simultaneously when they're being
// removed or repositioned.
- scoped_nsobject<NSViewAnimation> animation_;
+ base::scoped_nsobject<NSViewAnimation> animation_;
// The controller of the settings view. Only set while the view is open.
- scoped_nsobject<MCSettingsController> settingsController_;
+ base::scoped_nsobject<MCSettingsController> settingsController_;
// The flag which is set when the notification removal animation is still
// in progress and the user clicks "Clear All" button. The clear-all animation
@@ -92,7 +92,7 @@ MESSAGE_CENTER_EXPORT
std::list<MCNotificationController*> visibleNotificationsPendingClear_;
// Array of NSViewAnimation objects, which the array owns.
- scoped_nsobject<NSMutableArray> clearAllAnimations_;
+ base::scoped_nsobject<NSMutableArray> clearAllAnimations_;
// The duration of the bounds animation, in the number of seconds.
NSTimeInterval animationDuration_;
diff --git a/ui/message_center/cocoa/tray_view_controller.mm b/ui/message_center/cocoa/tray_view_controller.mm
index 1a90a96..9e0f9fa 100644
--- a/ui/message_center/cocoa/tray_view_controller.mm
+++ b/ui/message_center/cocoa/tray_view_controller.mm
@@ -125,7 +125,7 @@ const CGFloat kTrayBottomMargin = 75;
- (void)loadView {
// Configure the root view as a background-colored box.
- scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:NSMakeRect(
+ base::scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:NSMakeRect(
0, 0, [MCTrayViewController trayWidth], kControlAreaHeight)]);
[view setBorderType:NSNoBorder];
[view setBoxType:NSBoxCustom];
@@ -139,7 +139,7 @@ const CGFloat kTrayBottomMargin = 75;
[self layoutControlArea];
// Configure the scroll view in which all the notifications go.
- scoped_nsobject<NSView> documentView(
+ base::scoped_nsobject<NSView> documentView(
[[NSView alloc] initWithFrame:NSZeroRect]);
scrollView_.reset([[NSScrollView alloc] initWithFrame:[view frame]]);
clipView_.reset(
@@ -169,7 +169,7 @@ const CGFloat kTrayBottomMargin = 75;
std::map<std::string, MCNotificationController*> newMap;
- scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
+ base::scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]);
[shadow setShadowColor:[NSColor colorWithDeviceWhite:0 alpha:0.55]];
[shadow setShadowOffset:NSMakeSize(0, -1)];
[shadow setShadowBlurRadius:2.0];
@@ -188,7 +188,7 @@ const CGFloat kTrayBottomMargin = 75;
const auto& existing = notificationsMap_.find((*it)->id());
MCNotificationController* notification = nil;
if (existing == notificationsMap_.end()) {
- scoped_nsobject<MCNotificationController> controller(
+ base::scoped_nsobject<MCNotificationController> controller(
[[MCNotificationController alloc]
initWithNotification:*it
messageCenter:messageCenter_]);
@@ -425,7 +425,7 @@ const CGFloat kTrayBottomMargin = 75;
[[self view] addSubview:backButton_];
// Create the divider line between the control area and the notifications.
- scoped_nsobject<NSBox> divider(
+ base::scoped_nsobject<NSBox> divider(
[[NSBox alloc] initWithFrame:NSMakeRect(0, 0, NSWidth([view frame]), 1)]);
[divider setAutoresizingMask:NSViewMinYMargin];
[divider setBorderType:NSNoBorder];
@@ -598,7 +598,7 @@ const CGFloat kTrayBottomMargin = 75;
}
- (void)hideNotificationsPendingRemoval {
- scoped_nsobject<NSMutableArray> animationDataArray(
+ base::scoped_nsobject<NSMutableArray> animationDataArray(
[[NSMutableArray alloc] init]);
// Fade-out those notifications pending removal.
@@ -629,7 +629,7 @@ const CGFloat kTrayBottomMargin = 75;
}
- (void)moveUpRemainingNotifications {
- scoped_nsobject<NSMutableArray> animationDataArray(
+ base::scoped_nsobject<NSMutableArray> animationDataArray(
[[NSMutableArray alloc] init]);
// Compute the position where the remaining notifications should start.
@@ -705,7 +705,7 @@ const CGFloat kTrayBottomMargin = 75;
NSViewAnimationEndFrameKey : [NSValue valueWithRect:newFrame],
NSViewAnimationEffectKey : NSViewAnimationFadeOutEffect
};
- scoped_nsobject<NSViewAnimation> animation([[NSViewAnimation alloc]
+ base::scoped_nsobject<NSViewAnimation> animation([[NSViewAnimation alloc]
initWithViewAnimations:[NSArray arrayWithObject:animationDict]]);
[animation setDuration:animationDuration_];
[animation setDelegate:self];
diff --git a/ui/message_center/cocoa/tray_view_controller_unittest.mm b/ui/message_center/cocoa/tray_view_controller_unittest.mm
index 0296a7a..55a48d7 100644
--- a/ui/message_center/cocoa/tray_view_controller_unittest.mm
+++ b/ui/message_center/cocoa/tray_view_controller_unittest.mm
@@ -4,7 +4,7 @@
#import "ui/message_center/cocoa/tray_view_controller.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -57,7 +57,7 @@ class TrayViewControllerTest : public ui::CocoaTest {
base::MessageLoop message_loop_;
scoped_ptr<base::RunLoop> nested_run_loop_;
- scoped_nsobject<MCTrayViewController> tray_;
+ base::scoped_nsobject<MCTrayViewController> tray_;
};
TEST_F(TrayViewControllerTest, AddRemoveOne) {
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index 8893762..1511318 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -17,7 +17,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#import "base/memory/scoped_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "grit/ui_strings.h"
@@ -100,7 +100,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
// The bridge for results from Cocoa to return to us.
- scoped_nsobject<SelectFileDialogBridge> bridge_;
+ base::scoped_nsobject<SelectFileDialogBridge> bridge_;
// A map from file dialogs to the |params| user data associated with them.
std::map<NSSavePanel*, void*> params_map_;
diff --git a/ui/snapshot/snapshot_mac.mm b/ui/snapshot/snapshot_mac.mm
index 5a0c6d6..abd8728 100644
--- a/ui/snapshot/snapshot_mac.mm
+++ b/ui/snapshot/snapshot_mac.mm
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "ui/gfx/rect.h"
namespace ui {
@@ -49,7 +49,7 @@ bool GrabViewSnapshot(gfx::NativeView view,
if (CGImageGetWidth(windowSnapshot) <= 0)
return false;
- scoped_nsobject<NSBitmapImageRep> rep(
+ base::scoped_nsobject<NSBitmapImageRep> rep(
[[NSBitmapImageRep alloc] initWithCGImage:windowSnapshot]);
NSData* data = [rep representationUsingType:NSPNGFileType properties:nil];
const unsigned char* buf = static_cast<const unsigned char*>([data bytes]);
diff --git a/ui/snapshot/snapshot_mac_unittest.mm b/ui/snapshot/snapshot_mac_unittest.mm
index 362902e..2765792 100644
--- a/ui/snapshot/snapshot_mac_unittest.mm
+++ b/ui/snapshot/snapshot_mac_unittest.mm
@@ -6,8 +6,8 @@
#import <Cocoa/Cocoa.h>
+#include "base/mac/scoped_nsobject.h"
#include "base/mac/sdk_forward_declarations.h"
-#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "testing/platform_test.h"
#include "ui/gfx/rect.h"
@@ -20,7 +20,7 @@ typedef PlatformTest GrabWindowSnapshotTest;
TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) {
// Launch a test window so we can take a snapshot.
NSRect frame = NSMakeRect(0, 0, 400, 400);
- scoped_nsobject<NSWindow> window(
+ base::scoped_nsobject<NSWindow> window(
[[NSWindow alloc] initWithContentRect:frame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@@ -35,7 +35,7 @@ TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) {
bounds));
// Copy png back into NSData object so we can make sure we grabbed a png.
- scoped_nsobject<NSData> image_data(
+ base::scoped_nsobject<NSData> image_data(
[[NSData alloc] initWithBytes:&(*png_representation)[0]
length:png_representation->size()]);
NSBitmapImageRep* rep = [NSBitmapImageRep imageRepWithData:image_data.get()];
diff --git a/webkit/common/cursors/webcursor_mac.mm b/webkit/common/cursors/webcursor_mac.mm
index bbf18a4..65e4dd5 100644
--- a/webkit/common/cursors/webcursor_mac.mm
+++ b/webkit/common/cursors/webcursor_mac.mm
@@ -9,11 +9,11 @@
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "grit/webkit_chromium_resources.h"
#include "skia/ext/skia_utils_mac.h"
-#include "third_party/WebKit/public/web/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/WebKit/public/web/WebCursorInfo.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/size_conversions.h"
diff --git a/webkit/common/user_agent/user_agent_util_ios.mm b/webkit/common/user_agent/user_agent_util_ios.mm
index 3c80bab..a5f2706 100644
--- a/webkit/common/user_agent/user_agent_util_ios.mm
+++ b/webkit/common/user_agent/user_agent_util_ios.mm
@@ -9,7 +9,7 @@
#include <sys/sysctl.h>
#include <string>
-#include "base/memory/scoped_nsobject.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/sys_string_conversions.h"
@@ -110,7 +110,7 @@ std::string BuildOSCpuInfo() {
// objectForKey:NSLocaleLanguageCode and objectForKey:NSLocaleCountryCode)
// are not useful here because they return information related to the
// "Region Format" setting, which is different from the "Language" setting.
- scoped_nsobject<NSDictionary> dialects([[NSDictionary alloc]
+ base::scoped_nsobject<NSDictionary> dialects([[NSDictionary alloc]
initWithObjectsAndKeys:
@"ar", @"ar", // No dialect code in Safari.
@"ca-es", @"ca",