Rewrite vector<T*> into vector<raw_ptr<T, VectorExperimental>>
See chromium-dev announcement: https://groups.google.com/a/chromium.org/g/chromium-dev/c/sKckMpzHQgY/m/M3SWxEg3AQAJ?utm_medium=email&utm_source=footer Code review: - First patch: Automatic rewrite - Later patches: Manual fixes The automatic rewrite used the script: ./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh Binary size increase: The increase is only 33% (+5kB) above the per-patch limit (+16kB). This is not a lot given the size of the rewrite. Increase of around 500kb was approved for MiraclePtr. AX-Relnotes: n/a. Binary-Size: See commit description. Bug: 1432993 Change-Id: I8dfc4c2b274b724b99cf408f010da5c821edae9c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5140028 Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1239777}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2d3d322cbd
commit
e63cbaf6fd
ash
accelerators
accessibility
ambient
app_list
app_list_controller_impl.ccapp_list_test_api.cc
model
views
app_list_bubble_view.ccapp_list_folder_view.ccapp_list_search_view.ccapp_list_search_view.happ_list_search_view_unittest.ccapps_grid_view_unittest.cc
assistant
contents_view.hcontinue_section_view_unittest.cccontinue_task_container_view.cccontinue_task_container_view.hpage_switcher.ccrecent_apps_view.ccrecent_apps_view.hrecent_apps_view_unittest.ccresult_selection_controller.hresult_selection_controller_unittest.ccsearch_result_image_list_view.ccsearch_result_image_list_view.hsearch_result_list_view.hsearch_result_list_view_unittest.ccapp_menu
assistant
autotest_private_api_utils.ccbubble
capture_mode
capture_mode_camera_controller.cccapture_mode_camera_unittests.cccapture_mode_menu_group.cccapture_mode_menu_group.hcapture_mode_session.cccapture_mode_session_focus_cycler.cccapture_mode_unittests.cckey_combo_view.cckey_item_view.ccvideo_recording_watcher.cc
color_enhancement
components
arc
curtain
debug.ccdisplay
display_color_manager.ccdisplay_error_observer.ccdisplay_manager_unittest.ccmirror_window_test_api.ccprivacy_screen_controller.ccprivacy_screen_controller.hscreen_orientation_controller.ccscreen_position_controller.htouch_calibrator_controller_unittest.cc
drag_drop
events
fast_ink
focus_cycler.ccfocus_cycler.hfocus_cycler_unittest.ccframe
frame_throttler
game_dashboard
glanceables
host
hud_display
login
ui
access_code_input.ccaccess_code_input.hlock_contents_view.cclock_contents_view_unittest.cclock_screen_media_controls_view.cclock_screen_media_controls_view.hlock_screen_media_controls_view_unittest.cclogin_auth_factors_view_unittest.cclogin_expanded_public_account_view_unittest.cclogin_pin_view.hlogin_test_utils.cclogin_user_view.ccscrollable_users_list_view.ccscrollable_users_list_view.hviews_utils.cc
multi_user
picker
public
cpp
quick_pair
feature_status_tracker
scalable_iph
shelf
drag_window_from_shelf_controller.ccdrag_window_from_shelf_controller_unittest.cclogin_shelf_view.cclogin_shelf_view.hshelf.ccshelf_layout_manager.ccshelf_view.cc
shell_delegate.hshortcut_viewer
views
style
option_button_group.ccoption_button_group.hradio_button_group.cc
style_viewer
system_ui_components_grid_view.ccsystem_ui_components_style_viewer_view.ccsystem_ui_components_style_viewer_view.h
tab_slider.cctab_slider.hsystem
accessibility
bluetooth
cast
holding_space
holding_space_drag_util.ccholding_space_test_api.ccholding_space_tray_bubble.hholding_space_tray_child_bubble.hholding_space_tray_unittest.cc
input_device_settings
media
message_center
ash_message_popup_collection_unittest.ccash_notification_view.ccash_notification_view.hash_notification_view_unittest.cc
notification_center
notification_center_tray.ccnotification_center_view.ccnotification_center_view.hnotification_center_view_unittest.ccnotification_list_view.ccnotification_list_view.hnotification_list_view_unittest.ccstacked_notification_bar.ccstacked_notification_bar.h
phonehub
phone_hub_more_apps_button.hphone_hub_recent_apps_view.ccphone_hub_recent_apps_view.hphone_hub_recent_apps_view_unittest.cctask_continuation_view_unittest.cc
power
privacy
status_area_animation_controller.ccstatus_area_widget.ccstatus_area_widget.hstatus_area_widget_delegate.cctime
calendar_month_view.cccalendar_month_view.hcalendar_up_next_view.cccalendar_up_next_view_unittest.cccalendar_view_unittest.cc
toast
tray
unified
feature_tiles_container_view.ccfeature_tiles_container_view.hfeature_tiles_container_view_unittest.ccglanceable_tray_bubble_view.ccnotification_icons_controller.huser_chooser_view.h
video_conference
user_education
utility
wallpaper
wm
ash_focus_rules.cc
collision_detection
container_finder.hdesks
desk.ccdesk.hdesk_animation_base.ccdesk_animation_impl.ccdesk_animation_impl_unittest.ccdesk_bar_view_base.ccdesk_bar_view_base.hdesk_mini_view_animations.ccdesk_mini_view_animations.hdesk_preview_view.ccdesks_controller.ccdesks_test_api.ccdesks_unittests.ccdesks_util.ccdesks_util.hroot_window_desk_switch_animator.hscroll_arrow_button.cc
drag_window_controller.cctemplates
admin_template_launch_tracker.ccrestore_data_collector.ccrestore_data_collector.hsaved_desk_controller.ccsaved_desk_dialog_controller.ccsaved_desk_dialog_controller.hsaved_desk_grid_view.ccsaved_desk_grid_view.hsaved_desk_icon_container.ccsaved_desk_icon_container.hsaved_desk_item_view.ccsaved_desk_library_view.ccsaved_desk_library_view.hsaved_desk_presenter.ccsaved_desk_presenter.hsaved_desk_test_util.ccsaved_desk_unittest.cc
float
fullscreen_window_finder.ccmru_window_tracker.ccmru_window_tracker.hmulti_display
overview
overview_controller.ccoverview_drop_target.ccoverview_drop_target.hoverview_focus_cycler.ccoverview_focus_cycler_unittest.ccoverview_grid.ccoverview_grid.hoverview_grid_unittest.ccoverview_group_item.ccoverview_group_item.hoverview_item.ccoverview_item.hoverview_item_base.ccoverview_item_base.hoverview_session.ccoverview_session_unittest.ccoverview_utils.ccoverview_window_drag_controller_unittest.ccscoped_overview_hide_windows.ccscoped_overview_hide_windows.hscoped_overview_transform_window.ccscoped_overview_transform_window.h
pip
resize_shadow_and_cursor_unittest.ccroot_window_layout_manager.ccroot_window_layout_manager.hscreen_dimmer_unittest.ccscreen_pinning_controller_unittest.ccsnap_group
splitview
auto_snap_controller.ccsplit_view_divider.ccsplit_view_metrics_controller.ccsplit_view_metrics_controller.hsplit_view_utils.cc
system_modal_container_layout_manager.htablet_mode
window_cycle
window_cycle_controller.ccwindow_cycle_controller.hwindow_cycle_item_view.ccwindow_cycle_item_view.hwindow_cycle_list.ccwindow_cycle_list.hwindow_cycle_view.ccwindow_cycle_view.h
window_finder.ccwindow_mirror_view.ccwindow_positioner.ccwindow_restore
window_restore_controller.ccwindow_restore_controller.hwindow_restore_controller_unittest.ccwindow_restore_util.ccwindow_restore_util.h
window_util.ccwindow_util.hwindow_util_unittest.ccworkspace
backdrop_controller.ccmulti_window_resize_controller.ccmulti_window_resize_controller.hworkspace_event_handler_unittest.ccworkspace_layout_manager.ccworkspace_layout_manager_unittest.ccworkspace_window_resizer.ccworkspace_window_resizer.hworkspace_window_resizer_unittest.cc
workspace_controller_unittest.ccwm_mode
base
metrics
observer_list_threadsafe_unittest.ccrun_loop.ccrun_loop.hsampling_heap_profiler
scoped_multi_source_observation_unittest.ccscoped_observation_unittest.cctask
common
threading
trace_event
cc
layers
metrics
raster
test
tiles
eviction_tile_priority_queue.cceviction_tile_priority_queue.hgpu_image_decode_cache.ccgpu_image_decode_cache.hpicture_layer_tiling_set.ccpicture_layer_tiling_set.hraster_tile_priority_queue.ccraster_tile_priority_queue.hraster_tile_priority_queue_all.ccraster_tile_priority_queue_all.hraster_tile_priority_queue_required.ccraster_tile_priority_queue_required.htiles_with_resource_iterator.cctiles_with_resource_iterator.h
trees
chrome
browser
accessibility
android
app_controller_mac.mmapps
app_service
guest_view
platform_apps
ash
app_list
app_list_client_impl.ccapp_list_model_updater.ccapp_list_model_updater.hchrome_app_list_item_manager.ccchrome_app_list_item_manager.hchrome_app_list_item_manager_unittest.ccchrome_app_list_model_updater.ccchrome_app_list_model_updater.h
search
test
app_restore
arc
accessibility
input_overlay
actions
ui
tracing
child_accounts
parent_access_code
crosapi
extensions
file_manager
floating_workspace
input_method
login
existing_user_controller.cc
oobe_quick_start
connectivity
saml
session
user_online_signin_notifier.ccusers
net
note_taking_helper_unittest.ccnotifications
phonehub
platform_keys
key_permissions
policy
dlp
off_hours
reporting
metrics_reporting
status_collector
power
profiles
scalable_iph
system_logs
video_conference
autocomplete
autofill
background
background_fetch
background_sync
bookmarks
browser_process_platform_part_chromeos_browsertest.ccbrowser_switcher
browsing_data
browsing_data_remover_browsertest_base.ccchrome_browsing_data_lifetime_manager.ccchrome_browsing_data_lifetime_manager_browsertest.ccchrome_browsing_data_remover_delegate_unittest.cc
counters
cart
certificate_provider
chrome_navigation_browsertest.ccchromeos
app_mode
enterprise
cloud_storage
extensions
policy
dlp
dialogs
companion
content_settings
device_identity
devtools
device
devtools_browser_context_manager.ccdevtools_file_watcher.ccdevtools_window.ccdevtools_window_testing.hprotocol
dips
dom_distiller
download
android
dangerous_download_dialog_bridge.ccdangerous_download_dialog_bridge.hdownload_dialog_utils.ccdownload_dialog_utils.hdownload_manager_service.hduplicate_download_dialog_bridge_delegate.ccduplicate_download_dialog_bridge_delegate.hinsecure_download_dialog_bridge.h
bubble
download_bubble_ui_controller.ccdownload_bubble_ui_controller_unittest.ccdownload_bubble_update_service.ccdownload_bubble_update_service.h
chrome_download_manager_delegate.ccchrome_download_manager_delegate_unittest.ccdownload_browsertest.ccdownload_browsertest_utils.ccdownload_browsertest_utils.hdownload_frame_policy_browsertest.ccdownload_history.ccdownload_history_unittest.ccdownload_offline_content_provider.ccdownload_offline_content_provider.hdownload_query.hdownload_query_unittest.ccdownload_status_updater.ccdownload_status_updater_unittest.ccdownload_status_updater_win.ccdownload_ui_controller.ccnotification
download_notification_browsertest.ccmulti_profile_download_notifier.ccmulti_profile_download_notifier.hmulti_profile_download_notifier_unittest.cc
save_page_browsertest.ccenterprise
extensions
api
autofill_private
bookmark_manager_private
cookies
declarative_content
content_condition_unittest.ccdeclarative_content_css_condition_tracker.hdeclarative_content_page_url_condition_tracker.h
downloads
management
messaging
sessions
tab_groups
tabs
forced_extensions
theme_installed_infobar_delegate.ccwindow_open_apitest.cchistory_clusters
installable
lacros
browser_launcher_browsertest.ccbrowser_service_lacros.ccdesk_template_client_lacros.ccdownload_controller_client_lacros.ccdownload_controller_client_lacros_browsertest.ccdownload_status_updater_lacros_browsertest.cc
sync
lifetime
lookalikes
media
media_engagement_contents_observer.ccmedia_engagement_contents_observer_unittest.ccmedia_engagement_session_unittest.cc
webrtc
metrics
navigation_predictor
nearby_sharing
certificates
fake_nearby_share_certificate_manager.hfake_nearby_share_certificate_storage.hnearby_share_certificate_manager_impl_unittest.cc
client
contacts
local_device_data
net
new_tab_page
modules
notifications
notification_interactive_uitest.ccplatform_notification_service_impl.ccplatform_notification_service_unittest.cc
scheduler
optimization_guide
page_load_metrics
integration_tests
observers
ad_metrics
back_forward_cache_page_load_metrics_observer_browsertest.cccore
foreground_duration_ukm_observer_browsertest.ccfrom_gws_page_load_metrics_observer_unittest.ccjavascript_frameworks_ukm_observer_browsertest.cclocal_network_requests_page_load_metrics_observer_unittest.ccmulti_tab_loading_page_load_metrics_observer.ccpage_anchors_metrics_observer_browsertest.ccpage_anchors_metrics_observer_unittest.ccprefetch_page_load_metrics_observer_browsertest.ccprefetch_page_load_metrics_observer_unittest.ccprerender_page_load_metrics_observer_browsertest.ccsecurity_state_page_load_metrics_observer_browsertest.ccservice_worker_page_load_metrics_observer_unittest.cctab_strip_page_load_metrics_observer.ccpassword_manager
android
chrome_password_manager_client.ccchrome_password_manager_client.hpassword_manager_test_base.ccpdf
performance_manager
permissions
plugins
policy
policy_value_and_status_aggregator.ccpolicy_value_and_status_aggregator.hprofile_policy_connector.ccprofile_policy_connector.h
test
predictors
prefs
printing
privacy
privacy_budget
profile_resetter
profiles
push_messaging
resource_coordinator
safe_browsing
download_protection
extension_telemetry
incident_reporting
safe_browsing_navigation_observer_browsertest.ccscreen_ai
search_engines
segmentation_platform
client_util
sessions
better_session_restore_browsertest.ccsession_data_service.ccsession_restore_browsertest.ccsession_restore_browsertest_chromeos.ccsession_service.ccsession_service_base.cc
site_isolation
subresource_filter
supervised_user
sync
test
integration
apps_helper.ccapps_helper.hbookmarks_helper.ccextensions_helper.hmulti_client_status_change_checker.ccmulti_client_status_change_checker.hquiesce_status_change_checker.ccquiesce_status_change_checker.hsessions_helper.hsync_app_list_helper.ccsync_arc_package_helper.ccsync_service_impl_harness.ccsync_test.ccsync_test.htwo_client_contact_info_sync_test.ccwallet_helper.ccworkspace_desk_helper.ccworkspace_desk_helper.h
task_manager
mock_web_contents_task_manager.h
providers
fallback_task_provider.ccfallback_task_provider.hfallback_task_provider_unittest.cc
web_contents
extension_tag_browsertest.cctab_contents_tag_browsertest.ccweb_app_tag_browsertest.ccweb_contents_tags_manager.hweb_contents_task_provider.cc
worker_task_provider_browsertest.ccsampling
tpcd
heuristics
ui
android
passwords
tab_model
ash
accessibility
app_list
assistant
test_support
desks
download_status
holding_space
holding_space_downloads_delegate.ccholding_space_keyed_service_browsertest.ccholding_space_test_util.ccholding_space_ui_browsertest.cc
multi_user
session_controller_client_impl.ccsharesheet
shelf
app_service
app_service_app_window_shelf_controller.ccapp_service_app_window_shelf_controller.happ_service_app_window_shelf_item_controller.ccapp_service_instance_registry_helper.cc
app_shortcut_shelf_item_controller.ccapp_shortcut_shelf_item_controller.hbrowser_shortcut_shelf_item_controller.ccbrowser_status_monitor.ccchrome_shelf_controller.ccchrome_shelf_controller_browsertest.ccstandalone_browser_extension_app_shelf_item_controller.ccstandalone_browser_extension_app_shelf_item_controller.haura
accessibility
autofill
blocked_content
bookmarks
bookmark_browsertest.ccbookmark_context_menu_controller.ccbookmark_context_menu_controller.hbookmark_context_menu_controller_unittest.ccbookmark_drag_drop.ccbookmark_drag_drop.hbookmark_ui_utils_desktop_unittest.ccbookmark_utils.ccbookmark_utils_desktop.ccbookmark_utils_desktop.h
browser.ccbrowser_browsertest.ccbrowser_close_unittest.ccbrowser_finder.ccbrowser_list.ccbrowser_list.hbrowser_tab_strip_tracker.cccocoa
applescript
cookie_controls
global_error
media_router
passwords
bubble_controllers
credential_leak_dialog_controller_impl_unittest.ccmanage_passwords_state.ccmanage_passwords_state.hmanage_passwords_state_unittest.ccmanage_passwords_test.ccmanage_passwords_ui_controller.ccmanage_passwords_ui_controller.hmanage_passwords_ui_controller_unittest.ccpasswords_client_ui_delegate.hpermission_bubble
sad_tab.ccsearch_engines
send_tab_to_self
settings_window_manager_browsertest_chromeos.ccstartup
startup_browser_creator_browsertest.ccstartup_browser_creator_triggered_reset_browsertest_win.ccweb_app_info_recorder_utils.cc
sync
tabs
test
thumbnails
toolbar
uma_browsing_activity_observer.ccviews
accessibility
apps
app_dialog
autofill
bookmarks
bookmark_bar_view.ccbookmark_bar_view.hbookmark_bar_view_unittest.ccbookmark_context_menu.ccbookmark_context_menu.hbookmark_context_menu_unittest.ccbookmark_menu_delegate.ccbookmark_menu_delegate.hbookmark_menu_delegate_unittest.cc
content_setting_bubble_contents.hdark_mode_manager_linux.ccdark_mode_manager_linux.hdark_mode_manager_linux_unittest.ccsaved_tab_groups
desktop_capture
download
editor_menu
extensions
device_chooser_extension_browsertest.ccextensions_menu_main_page_view.ccextensions_menu_site_permissions_page_view.ccextensions_toolbar_interactive_uitest.cc
frame
browser_non_client_frame_view_chromeos_browsertest.ccbrowser_view_layout.ccbrowser_view_layout.hbrowser_window_property_manager_browsertest_win.ccdbus_appmenu.ccpicture_in_picture_browser_frame_view.ccpicture_in_picture_browser_frame_view.h
global_media_controls
media_item_ui_device_selector_view.ccmedia_item_ui_device_selector_view_unittest.ccmedia_item_ui_footer_view.ccmedia_item_ui_footer_view_unittest.cc
infobars
intent_picker_bubble_view.ccintent_picker_dialog_browsertest.cclocation_bar
omnibox
omnibox_mouse_enter_exit_handler.homnibox_popup_view_views.ccomnibox_popup_view_views_browsertest.cc
page_action
page_info
page_info_bubble_view_unittest.ccpage_info_main_view.ccpage_info_main_view.hsafety_tip_page_info_bubble_view_browsertest.cc
passwords
password_bubble_interactive_uitest.ccpassword_save_unsynced_credentials_locally_view.ccpassword_save_unsynced_credentials_locally_view.h
payments
payment_request_journey_logger_browsertest.ccprofile_list_view_controller.ccprofile_list_view_controller.hview_stack.ccview_stack.h
permissions
embedded_permission_prompt.ccembedded_permission_prompt.hembedded_permission_prompt_ask_view.ccembedded_permission_prompt_view_delegate.hmidi_permissions_flow_interactive_uitest.ccpermission_chip_unittest.ccpermission_prompt_bubble_base_view.ccpermission_prompt_bubble_base_view.hpermission_prompt_bubble_one_origin_view.ccpermission_prompt_bubble_one_origin_view_unittest.ccpermission_prompt_bubble_two_origins_view_unittest.ccpermission_prompt_chip.ccpermission_prompt_factory.cc
sad_tab_view.hsharing
sharing_hub
side_panel
tab_sharing
tabs
color_picker_view.htab_drag_context.htab_drag_controller.cctab_drag_controller.htab_drag_controller_interactive_uitest.cctab_group_views.cctab_group_views.htab_strip.cctab_strip.htab_strip_unittest.cc
toolbar
app_menu.ccpinned_toolbar_actions_container.ccpinned_toolbar_actions_container.hpinned_toolbar_actions_container_unittest.cctoolbar_controller.cctoolbar_controller_interactive_uitest.cctoolbar_controller_unittest.cc
web_apps
frame_toolbar
webauthn
webid
webview_accessibility_browsertest.ccweb_applications
share_to_target_browsertest.ccsub_apps_install_dialog_controller_unittest.cc
test
web_app_metrics_browsertest.ccweb_app_ui_manager_impl.ccwebui
access_code_cast
ash
discards
downloads
downloads_dom_handler.ccdownloads_dom_handler.hdownloads_dom_handler_unittest.ccdownloads_list_tracker_unittest.cc
history
settings
custom_home_pages_table_model.ccperformance_handler.ccsettings_secure_dns_handler.ccsettings_secure_dns_handler_browsertest.ccsite_settings_handler.ccsite_settings_handler_unittest.cc
side_panel
tab_search
tab_strip
vr
web_applications
common
renderer
test
base
dialog_test_browser_window.ccmixin_based_in_process_browser_test.htesting_profile.ccui_test_utils.cc
media_router
access_code_cast
utility
importer
chromecast/browser
chromeos
ash
components
browser_context_helper
hid_detection
scalable_iph
tether
services
bluetooth_config
bluetooth_device_status_notifier_impl_unittest.ccdevice_cache_impl_unittest.ccdevice_name_manager_impl_unittest.ccdevice_operation_handler_impl_unittest.ccdevice_pairing_handler_impl_unittest.ccdiscovery_session_manager_impl_unittest.ccfake_device_pairing_handler.hfake_discovery_session_manager.h
cellular_setup
device_sync
cryptauth_v2_enrollment_manager_impl_unittest.ccfake_cryptauth_device_notifier.hfake_cryptauth_device_syncer.hfake_cryptauth_feature_status_getter.hfake_cryptauth_feature_status_setter.hfake_cryptauth_group_private_key_sharer.hfake_cryptauth_metadata_syncer.hfake_remote_device_v2_loader.h
secure_channel
components
cdm_factory_daemon
ui
frame
components
autofill
content
core
browser
autofill_client.ccautofill_client.hautofill_driver.hautofill_manager.ccautofill_manager.hautofill_suggestion_generator.ccautofill_suggestion_generator.hautofill_suggestion_generator_unittest.ccautofill_test_utils.ccautofill_test_utils.hbrowser_autofill_manager.ccbrowser_autofill_manager_unittest.cc
crowdsourcing
autofill_crowdsourcing_manager.ccautofill_crowdsourcing_manager.hautofill_crowdsourcing_manager_unittest.ccmock_autofill_crowdsourcing_manager.h
data_model
form_parsing
autofill_scanner.ccautofill_scanner.hcredit_card_field.cccredit_card_field.hform_field.ccform_field.h
form_structure.ccform_structure.hform_structure_process_query_response_fuzzer.ccform_structure_test_api.hform_structure_unittest.ccmetrics
payments
personal_data_manager.cctest_autofill_driver.hui
ios
blocked_content
bookmarks
browser
browser_sync
cast_streaming
renderer
commerce
content_capture
content_settings
desks_storage
core
admin_template_service_unittests.ccdesk_model.ccdesk_model.hdesk_model_observer.hdesk_model_wrapper.ccdesk_model_wrapper_unittests.ccdesk_sync_bridge.ccdesk_sync_bridge.hdesk_sync_bridge_unittest.ccfake_desk_sync_bridge.ccfake_desk_sync_bridge.hlocal_desk_data_manager.cclocal_desk_data_manager_unittests.cc
device_signals
core
system_signals
win
download
content
internal
internal
background_service
common
public
exo
client_controlled_shell_surface.ccshell_surface_base.ccshell_surface_unittest.ccsurface.ccsurface.hvsync_timing_manager.ccvsync_timing_manager.hwm_helper.cc
feed
core
v2
stream_model
global_media_controls
history
infobars
keyed_service
core
live_caption
media_message_center
media_notification_view_impl.ccmedia_notification_view_impl.hmedia_notification_view_impl_unittest.ccmedia_notification_view_modern_impl.ccmedia_notification_view_modern_impl_unittest.cc
metrics
omnibox
browser
optimization_guide
content
core
page_load_metrics
browser
observers
password_manager
content
core
browser
credential_cache.cccredential_cache.hcredential_manager_impl.cccredential_manager_impl_unittest.cccredential_manager_password_form_manager_unittest.cccredential_manager_pending_request_task.ccfake_form_fetcher.ccfake_form_fetcher.hform_fetcher.hform_fetcher_impl.ccform_fetcher_impl.hform_saver.hform_saver_impl.ccform_saver_impl.hform_saver_impl_unittest.ccmock_password_form_manager_for_ui.hpassword_autofill_manager_unittest.ccpassword_form_filling.ccpassword_form_filling.hpassword_form_filling_unittest.ccpassword_form_manager.ccpassword_form_manager.hpassword_form_manager_for_ui.hpassword_form_manager_unittest.ccpassword_form_metrics_recorder_unittest.ccpassword_generation_manager.ccpassword_generation_manager.hpassword_generation_manager_unittest.ccpassword_manager.ccpassword_manager.hpassword_manager_client.ccpassword_manager_client.hpassword_manager_metrics_recorder_unittest.ccpassword_manager_metrics_util_unittest.ccpassword_manager_unittest.ccpassword_manager_util.ccpassword_manager_util.hpassword_manager_util_unittest.ccpassword_save_manager_impl.ccpassword_save_manager_impl.hpassword_save_manager_impl_unittest.ccstub_form_saver.hsync_credentials_filter_unittest.cc
ui
votes_uploader.ccvotes_uploader.hvotes_uploader_unittest.ccpayments
content
core
pdf
performance_manager
v8_memory
permissions
android
permission_prompt
test
policy
core
power_bookmarks
reporting
metrics
safe_browsing
android
content
browser
search_engines
segmentation_platform
services
screen_ai
signin
subresource_filter
content
sync_bookmarks
sync_device_info
sync_sessions
open_tabs_ui_delegate.hopen_tabs_ui_delegate_impl.ccopen_tabs_ui_delegate_impl.hopen_tabs_ui_delegate_impl_unittest.ccsession_sync_bridge.ccsession_sync_bridge_unittest.ccsynced_session_tracker.ccsynced_session_tracker.htest_synced_window_delegates_getter.h
translate
ui_devtools
ukm
user_education
user_manager
viz
host
service
display
display_embedder
output_device_backing.ccoutput_device_backing.hskia_output_surface_impl.hskia_output_surface_impl_on_gpu.ccskia_output_surface_impl_on_gpu.h
frame_sinks
surfaces
test
content
browser
accessibility
accessibility_win_browsertest.ccbrowser_accessibility_mac.mmbrowser_accessibility_manager_win.ccbrowser_accessibility_manager_win.hcross_platform_accessibility_browsertest.ccone_shot_accessibility_tree_search.h
browsing_data
devtools
download
download_browsertest.ccdownload_manager_impl_unittest.ccdrag_download_file_browsertest.ccsave_package.h
media
navigation_browsertest.ccppapi_plugin_process_host.hpreloading
renderer_host
document_associated_data.hframe_tree.ccframe_tree.h
site_per_process_browsertest.ccinput
media
navigation_throttle_runner_unittest.ccrender_frame_host_impl_browsertest.ccrender_widget_host_view_aura_unittest.ccsms
web_contents
webid
public
renderer
accessibility
services
auction_worklet
web_test
courgette
device
bluetooth
gamepad
vr
extensions
browser
renderer
extension_throttle_simulation_unittest.ccfeature_cache.hnative_extension_bindings_system_test_base.h
shell
gpu/command_buffer
client
service
ios
chrome
app
spotlight
browser
bring_android_tabs
optimization_guide
passwords
policy
search_engines
synced_sessions
ui
autofill
badges
bookmarks
infobars
passwords
bottom_sheet
recent_tabs
settings
web_view
internal
autofill
ipc
media
audio
base
audio_bus.ccaudio_bus.haudio_bus_unittest.ccfake_demuxer_stream.ccfake_demuxer_stream.hmedia_resource.ccmedia_resource.hmedia_url_demuxer.ccmedia_url_demuxer.hmock_filters.hpipeline_impl.ccpipeline_impl_unittest.cc
cast
logging
filters
audio_renderer_algorithm.ccchunk_demuxer.ccchunk_demuxer.hchunk_demuxer_unittest.ccdecrypting_media_resource.ccdecrypting_media_resource.hdecrypting_media_resource_unittest.ccdemuxer_perftest.ccffmpeg_demuxer.ccffmpeg_demuxer.hffmpeg_demuxer_unittest.ccmanifest_demuxer.ccmanifest_demuxer.h
gpu
android
learning
midi
mojo
clients
services
remoting
renderers
test
video
mojo/public/cpp/bindings/lib
net
dns
log
proxy_resolution
reporting
reporting_browsing_data_remover.ccreporting_browsing_data_remover_unittest.ccreporting_cache.hreporting_cache_impl.ccreporting_cache_impl.hreporting_cache_unittest.ccreporting_delivery_agent.ccreporting_delivery_agent_unittest.ccreporting_endpoint_manager_unittest.ccreporting_garbage_collector.ccreporting_garbage_collector_unittest.ccreporting_network_change_observer_unittest.ccreporting_service.ccreporting_service.hreporting_service_unittest.ccreporting_test_util.ccreporting_test_util.h
socket
spdy
url_request
remoting
host
chromoting_host.ccchromoting_host_unittest.ccclient_session.ccclient_session.hclient_session_unittest.cchost_extension_session_manager.cchost_extension_session_manager.h
protocol
test
services
accessibility
android
accessibility_info_data_wrapper.haccessibility_node_info_data_wrapper.ccaccessibility_node_info_data_wrapper.haccessibility_window_info_data_wrapper.ccaccessibility_window_info_data_wrapper.handroid_accessibility_util.ccauto_complete_handler.ccax_tree_source_android.ccax_tree_source_android.hax_tree_source_android_unittest.ccdrawer_layout_handler.cc
audio
device
generic_sensor
network
resource_coordinator
storage/browser
third_party/blink
common
unique_name
renderer
core
exported
frame
html
paint
timing
modules
canvas
offscreencanvas
webrtc
ui
accessibility
ax_event_generator.hax_generated_tree_unittest.ccax_node.ccax_node.hax_table_fuzzer.ccax_table_info.ccax_table_info.hax_tree.ccax_tree.hax_tree_serializer.hax_tree_serializer_unittest.cc
platform
actions
aura
aura_extra
base
metadata
win
x
compositor
compositor_lock.cccompositor_lock.hdebug_utils.ccdebug_utils.hlayer.cclayer.hlayer_owner.cclayer_tree_owner.ccscoped_layer_animation_settings.cc
display
manager
apply_content_protection_task.cccontent_protection_key_manager.cccontent_protection_key_manager.hcontent_protection_key_manager_unittest.ccdisplay_change_observer.ccdisplay_configurator.ccdisplay_configurator.hdisplay_layout_manager.hdisplay_port_observer.ccdisplay_port_observer_unittest.cc
test
fake_display_delegate.cctest_display_layout_manager.cctest_display_layout_manager.htest_native_display_delegate.cctest_native_display_delegate.h
update_display_configuration_task.ccupdate_display_configuration_task.hupdate_display_configuration_task_unittest.ccutil
types
events
linux
message_center
ozone
demo
platform
views
accessibility
accessibility_paint_checks.ccax_aura_obj_cache.ccax_aura_obj_cache.hax_aura_obj_wrapper.hax_root_obj_wrapper.ccax_root_obj_wrapper.hax_tree_source_views.ccax_view_obj_wrapper.ccax_view_obj_wrapper.hax_virtual_view_wrapper.ccax_virtual_view_wrapper.hax_widget_obj_wrapper.ccax_widget_obj_wrapper.hax_window_obj_wrapper.ccax_window_obj_wrapper.hview_ax_platform_node_delegate.ccview_ax_platform_node_delegate.hview_ax_platform_node_delegate_auralinux.ccview_ax_platform_node_delegate_unittest.ccviews_ax_tree_manager.h
controls
examples
focus
interaction
layout
animating_layout_manager.ccanimating_layout_manager.hanimating_layout_manager_unittest.cccomposite_layout_tests.ccflex_layout_unittest.cclayout_manager.cclayout_manager.hlayout_manager_base.cclayout_manager_base.hlayout_manager_base_unittest.cctable_layout.cctable_layout.h
test
view.ccview.hview_targeter_delegate.ccview_unittest.ccview_utils.ccwidget
desktop_aura
native_widget_aura.ccsublevel_manager.hwidget_delegate_unittest.ccwindow_reorderer.ccwindow_reorderer_unittest.ccwindow
windows_stationarity_monitor_aura.ccwindows_stationarity_monitor_aura.hwm
@ -621,7 +621,7 @@ bool CanToggleOverview() {
|
||||
auto windows =
|
||||
Shell::Get()->mru_window_tracker()->BuildMruWindowList(kActiveDesk);
|
||||
// Do not toggle overview if there is a window being dragged.
|
||||
for (auto* window : windows) {
|
||||
for (aura::Window* window : windows) {
|
||||
if (WindowState::Get(window)->is_dragged())
|
||||
return false;
|
||||
}
|
||||
@ -700,8 +700,9 @@ void ActivateDeskAtIndex(AcceleratorAction action) {
|
||||
desks[target_index].get(),
|
||||
DesksSwitchSource::kIndexedDeskSwitchShortcut);
|
||||
} else {
|
||||
for (auto* root : Shell::GetAllRootWindows())
|
||||
for (aura::Window* root : Shell::GetAllRootWindows()) {
|
||||
desks_animations::PerformHitTheWallAnimation(root, /*going_left=*/false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void AccessibilityEventHandlerManager::RemoveAccessibilityEventHandler(
|
||||
void AccessibilityEventHandlerManager::UpdateEventHandlers() {
|
||||
// Remove them all and add them again so they are guaranteed to be in the
|
||||
// right order.
|
||||
for (auto* handler : event_handlers_) {
|
||||
for (ui::EventHandler* handler : event_handlers_) {
|
||||
if (handler == nullptr)
|
||||
continue;
|
||||
ash::Shell::Get()->RemovePreTargetHandler(handler);
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "ui/events/event_handler.h"
|
||||
|
||||
namespace ash {
|
||||
@ -47,7 +48,7 @@ class AccessibilityEventHandlerManager {
|
||||
|
||||
// List of the current event handlers, indexed by
|
||||
// AccessibilityEventHandlerType.
|
||||
std::vector<ui::EventHandler*> event_handlers_;
|
||||
std::vector<raw_ptr<ui::EventHandler, VectorExperimental>> event_handlers_;
|
||||
};
|
||||
|
||||
} // namespace ash
|
||||
|
@ -300,7 +300,7 @@ TEST_F(AutoclickTest, MovementThreshold) {
|
||||
GetAutoclickController()->SetMovementThreshold(movement_threshold);
|
||||
|
||||
// Run test for the secondary display too to test fix for crbug.com/449870.
|
||||
for (auto* root_window : root_windows) {
|
||||
for (aura::Window* root_window : root_windows) {
|
||||
gfx::Point center = root_window->GetBoundsInScreen().CenterPoint();
|
||||
|
||||
GetAutoclickController()->SetEnabled(true,
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "ash/frame_throttler/frame_throttling_controller.h"
|
||||
#include "base/check.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/time/time.h"
|
||||
#include "cc/paint/skottie_wrapper.h"
|
||||
@ -160,7 +161,7 @@ void AmbientAnimationFrameRateController::ThrottleFrameRateForCurrentSection() {
|
||||
|
||||
void AmbientAnimationFrameRateController::ThrottleFrameRate(
|
||||
base::TimeDelta frame_interval) {
|
||||
std::vector<aura::Window*> windows_as_vector;
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> windows_as_vector;
|
||||
for (const auto& [window, animation] : windows_to_throttle_) {
|
||||
windows_as_vector.push_back(window);
|
||||
}
|
||||
|
@ -211,10 +211,10 @@ PrefService* GetLastActiveUserPrefService() {
|
||||
// Gets the MRU window shown over the applist when in tablet mode.
|
||||
// Returns nullptr if no windows are shown over the applist.
|
||||
aura::Window* GetTopVisibleWindow() {
|
||||
std::vector<aura::Window*> window_list =
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> window_list =
|
||||
Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(
|
||||
DesksMruType::kActiveDesk);
|
||||
for (auto* window : window_list) {
|
||||
for (aura::Window* window : window_list) {
|
||||
if (!window->TargetVisibility() || WindowState::Get(window)->IsMinimized())
|
||||
continue;
|
||||
|
||||
@ -627,7 +627,7 @@ bool AppListControllerImpl::GoHome(int64_t display_id) {
|
||||
// The foreground window or windows (for split mode) - the windows that will
|
||||
// not be minimized without animations (instead they will be animated into the
|
||||
// home screen).
|
||||
std::vector<aura::Window*> foreground_windows;
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> foreground_windows;
|
||||
if (split_view_active) {
|
||||
foreground_windows = {split_view_controller->primary_window(),
|
||||
split_view_controller->secondary_window()};
|
||||
@ -677,7 +677,7 @@ bool AppListControllerImpl::GoHome(int64_t display_id) {
|
||||
// TODO(https://crbug.com/1019531): This can be removed once transitions
|
||||
// between in-app state and home do not cause work area updates.
|
||||
std::vector<std::unique_ptr<ScopedAnimationDisabler>> animation_disablers;
|
||||
for (auto* window : foreground_windows) {
|
||||
for (aura::Window* window : foreground_windows) {
|
||||
animation_disablers.push_back(
|
||||
std::make_unique<ScopedAnimationDisabler>(window));
|
||||
}
|
||||
@ -694,7 +694,7 @@ bool AppListControllerImpl::GoHome(int64_t display_id) {
|
||||
|
||||
// Minimize currently active windows, but this time, using animation.
|
||||
// Home screen will show when all the windows are done minimizing.
|
||||
for (auto* foreground_window : foreground_windows) {
|
||||
for (aura::Window* foreground_window : foreground_windows) {
|
||||
if (::wm::WindowAnimationsDisabled(foreground_window)) {
|
||||
WindowState::Get(foreground_window)->Minimize();
|
||||
window_transforms_callback.Run();
|
||||
@ -1834,7 +1834,7 @@ void AppListControllerImpl::UpdateForOverviewModeChange(bool show_home_launcher,
|
||||
aura::Window* app_list_window =
|
||||
Shell::Get()->app_list_controller()->GetHomeScreenWindow();
|
||||
if (app_list_window) {
|
||||
for (auto* child : wm::GetTransientChildren(app_list_window)) {
|
||||
for (aura::Window* child : wm::GetTransientChildren(app_list_window)) {
|
||||
if (show_home_launcher)
|
||||
child->Show();
|
||||
else
|
||||
|
@ -586,7 +586,7 @@ views::View* AppListTestApi::GetVisibleSearchResultView(int index) {
|
||||
app_list->GetViewsInGroup(kSearchResultViewGroup, &search_results);
|
||||
|
||||
int current_visible_index = -1;
|
||||
for (auto* view : search_results) {
|
||||
for (views::View* view : search_results) {
|
||||
if (view->GetVisible())
|
||||
++current_visible_index;
|
||||
if (current_visible_index == index)
|
||||
|
@ -143,14 +143,16 @@ FolderImage::FolderImage(const AppListConfig* app_list_config,
|
||||
}
|
||||
|
||||
FolderImage::~FolderImage() {
|
||||
for (auto* item : top_items_)
|
||||
for (ash::AppListItem* item : top_items_) {
|
||||
item->RemoveObserver(this);
|
||||
}
|
||||
item_list_->RemoveObserver(this);
|
||||
}
|
||||
|
||||
void FolderImage::UpdateIcon() {
|
||||
for (auto* item : top_items_)
|
||||
for (ash::AppListItem* item : top_items_) {
|
||||
item->RemoveObserver(this);
|
||||
}
|
||||
top_items_.clear();
|
||||
|
||||
for (size_t i = 0;
|
||||
@ -342,8 +344,9 @@ void FolderImage::OnListItemMoved(size_t from_index,
|
||||
|
||||
void FolderImage::RedrawIconAndNotify() {
|
||||
FolderImageSource::Icons top_icons;
|
||||
for (const auto* item : top_items_)
|
||||
for (const ash::AppListItem* item : top_items_) {
|
||||
top_icons.push_back(item->GetIcon(app_list_config_->type()));
|
||||
}
|
||||
const gfx::Size icon_size = app_list_config_->folder_icon_size();
|
||||
icon_ = gfx::ImageSkia(std::make_unique<FolderImageSource>(
|
||||
*app_list_config_, top_icons, icon_size),
|
||||
|
@ -116,7 +116,7 @@ class APP_LIST_MODEL_EXPORT FolderImage : public AppListItemListObserver,
|
||||
raw_ptr<const AppListItem, ExperimentalAsh> dragged_item_ = nullptr;
|
||||
|
||||
// Top items for generating folder icon.
|
||||
std::vector<AppListItem*> top_items_;
|
||||
std::vector<raw_ptr<AppListItem, VectorExperimental>> top_items_;
|
||||
|
||||
base::ObserverList<FolderImageObserver> observers_;
|
||||
};
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/time/time.h"
|
||||
#include "chromeos/ash/services/assistant/public/cpp/assistant_enums.h"
|
||||
@ -199,7 +200,7 @@ class ButtonFocusSkipper : public ui::EventHandler {
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<views::View*> buttons_;
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> buttons_;
|
||||
};
|
||||
|
||||
AppListBubbleView::AppListBubbleView(
|
||||
|
@ -292,8 +292,9 @@ class TopIconAnimation : public AppListFolderView::Animation,
|
||||
TopIconAnimation& operator=(const TopIconAnimation&) = delete;
|
||||
|
||||
~TopIconAnimation() override {
|
||||
for (auto* view : top_icon_views_)
|
||||
for (ash::TopIconAnimationView* view : top_icon_views_) {
|
||||
view->RemoveObserver(this);
|
||||
}
|
||||
top_icon_views_.clear();
|
||||
}
|
||||
|
||||
@ -483,7 +484,8 @@ class TopIconAnimation : public AppListFolderView::Animation,
|
||||
// not outlive the `folder_item_view_`.
|
||||
const raw_ptr<AppListItemView, ExperimentalAsh> folder_item_view_;
|
||||
|
||||
std::vector<TopIconAnimationView*> top_icon_views_;
|
||||
std::vector<raw_ptr<TopIconAnimationView, VectorExperimental>>
|
||||
top_icon_views_;
|
||||
|
||||
base::OnceClosure completion_callback_;
|
||||
};
|
||||
|
@ -284,7 +284,7 @@ void AppListSearchView::VisibilityChanged(View* starting_from,
|
||||
bool is_visible) {
|
||||
if (!is_visible) {
|
||||
result_selection_controller_->ClearSelection();
|
||||
for (auto* container : result_container_views_) {
|
||||
for (ash::SearchResultContainerView* container : result_container_views_) {
|
||||
container->ResetAndHide();
|
||||
}
|
||||
}
|
||||
@ -357,7 +357,7 @@ void AppListSearchView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
||||
void AppListSearchView::OnActiveAppListModelsChanged(
|
||||
AppListModel* model,
|
||||
SearchModel* search_model) {
|
||||
for (auto* container : result_container_views_) {
|
||||
for (ash::SearchResultContainerView* container : result_container_views_) {
|
||||
container->SetResults(search_model->results());
|
||||
}
|
||||
}
|
||||
@ -376,7 +376,7 @@ bool AppListSearchView::OverrideKeyNavigationAboveSearchResults(
|
||||
}
|
||||
|
||||
void AppListSearchView::UpdateForNewSearch(bool search_active) {
|
||||
for (auto* container : result_container_views_) {
|
||||
for (ash::SearchResultContainerView* container : result_container_views_) {
|
||||
container->SetActive(search_active);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,8 @@ class ASH_EXPORT AppListSearchView : public views::View,
|
||||
// `search_notifier_` is either accepted or timeout.
|
||||
void RemoveSearchNotifierView();
|
||||
|
||||
std::vector<SearchResultContainerView*> result_container_views_for_test() {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_container_views_for_test() {
|
||||
return result_container_views_;
|
||||
}
|
||||
|
||||
@ -162,7 +163,8 @@ class ASH_EXPORT AppListSearchView : public views::View,
|
||||
|
||||
// Containers for search result views. The contained views are owned by the
|
||||
// views hierarchy. Used by result_selection_controller_.
|
||||
std::vector<SearchResultContainerView*> result_container_views_;
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_container_views_;
|
||||
|
||||
// The notifier that shows the search privacy notice or educational nudge.
|
||||
raw_ptr<AppListToastView, ExperimentalAsh> search_notifier_ = nullptr;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "ash/shell.h"
|
||||
#include "ash/test/ash_test_base.h"
|
||||
#include "base/files/file.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/test/bind.h"
|
||||
@ -199,8 +200,8 @@ class AppListSearchViewTest : public AshTestBase {
|
||||
bool IsSearchResultPageVisible() { return GetSearchPage()->GetVisible(); }
|
||||
|
||||
std::vector<size_t> GetVisibleResultContainers() {
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
std::vector<size_t> visible_result_containers = {};
|
||||
for (size_t i = 0; i < result_containers.size(); i++) {
|
||||
if (result_containers[i]->GetVisible()) {
|
||||
@ -219,8 +220,8 @@ class AppListSearchViewTest : public AshTestBase {
|
||||
|
||||
SearchResultView* GetSearchResultView(size_t container_index,
|
||||
size_t view_index) {
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
if (container_index >= result_containers.size()) {
|
||||
ADD_FAILURE() << "Container index out of bounds";
|
||||
return nullptr;
|
||||
@ -316,9 +317,9 @@ TEST_P(SearchResultImageViewTest, ImageListViewVisible) {
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
// Check result container visibility.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -330,9 +331,10 @@ TEST_P(SearchResultImageViewTest, ImageListViewVisible) {
|
||||
// SearchResultImageListView container should be visible.
|
||||
EXPECT_TRUE(result_containers[2]->GetVisible());
|
||||
|
||||
std::vector<SearchResultImageView*> search_result_image_views =
|
||||
static_cast<SearchResultImageListView*>(result_containers[2])
|
||||
->GetSearchResultImageViews();
|
||||
std::vector<raw_ptr<SearchResultImageView, VectorExperimental>>
|
||||
search_result_image_views =
|
||||
static_cast<SearchResultImageListView*>(result_containers[2])
|
||||
->GetSearchResultImageViews();
|
||||
|
||||
// The SearchResultImageListView should have 3 result views.
|
||||
EXPECT_EQ(image_max_results, search_result_image_views.size());
|
||||
@ -380,9 +382,9 @@ TEST_P(SearchResultImageViewTest, OneResultShowsImageInfo) {
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
// Check result container visibility.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -405,7 +407,7 @@ TEST_P(SearchResultImageViewTest, OneResultShowsImageInfo) {
|
||||
|
||||
// Verify the actual texts shown in the info container are correct. Note that
|
||||
// the narrowed space \x202F is used in formatting the time of the day.
|
||||
const std::vector<views::Label*>& content_labels =
|
||||
const std::vector<raw_ptr<views::Label, VectorExperimental>>& content_labels =
|
||||
image_list_view->metadata_content_labels_for_test();
|
||||
EXPECT_EQ(content_labels[0]->GetText(), u"file name");
|
||||
EXPECT_EQ(content_labels[1]->GetText(), u"displayable folder");
|
||||
@ -430,10 +432,10 @@ TEST_P(SearchResultImageViewTest, ActivateImageResult) {
|
||||
SharedAppListConfig::instance().image_search_max_results());
|
||||
|
||||
// Check result container visibility.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
ASSERT_EQ(static_cast<int>(result_containers.size()), kResultContainersCount);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -489,9 +491,9 @@ TEST_P(SearchResultImageViewTest, PulsingBlocksShowWhenNoResultIcon) {
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
// Check result container visibility.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -499,9 +501,10 @@ TEST_P(SearchResultImageViewTest, PulsingBlocksShowWhenNoResultIcon) {
|
||||
// SearchResultImageListView container should be visible.
|
||||
EXPECT_TRUE(result_containers[2]->GetVisible());
|
||||
|
||||
std::vector<SearchResultImageView*> search_result_image_views =
|
||||
static_cast<SearchResultImageListView*>(result_containers[2])
|
||||
->GetSearchResultImageViews();
|
||||
std::vector<raw_ptr<SearchResultImageView, VectorExperimental>>
|
||||
search_result_image_views =
|
||||
static_cast<SearchResultImageListView*>(result_containers[2])
|
||||
->GetSearchResultImageViews();
|
||||
|
||||
// The SearchResultImageListView should have 3 result views.
|
||||
EXPECT_EQ(image_max_results, search_result_image_views.size());
|
||||
@ -724,9 +727,9 @@ TEST_P(SearchResultImageViewTest, ResultSelectionCycle) {
|
||||
SetUpSearchResults(results, 1, kDefaultSearchItems, 100, false,
|
||||
SearchResult::Category::kApps);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -811,9 +814,9 @@ TEST_P(SearchViewClamshellAndTabletTest, AnimateSearchResultView) {
|
||||
|
||||
// Verify that search containers have a scheduled update, and ensure they get
|
||||
// run.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -870,9 +873,9 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultContainerIsVisible) {
|
||||
// Press a key to start a search.
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -884,7 +887,7 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultContainerIsVisible) {
|
||||
PressAndReleaseKey(ui::VKEY_ESCAPE);
|
||||
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_FALSE(container->UpdateScheduled());
|
||||
}
|
||||
|
||||
@ -925,9 +928,9 @@ TEST_P(SearchViewClamshellAndTabletTest,
|
||||
// Press a key to start a search.
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -946,7 +949,7 @@ TEST_P(SearchViewClamshellAndTabletTest,
|
||||
|
||||
// Verify that clearing search results did not schedule a container update,
|
||||
// and that result view text has not been cleared.
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_FALSE(container->UpdateScheduled());
|
||||
}
|
||||
|
||||
@ -1010,9 +1013,9 @@ TEST_F(SearchViewTabletTest, SearchResultPageShownWhileClosing) {
|
||||
// Press a key to start a search.
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1069,9 +1072,9 @@ TEST_P(SearchViewClamshellAndTabletTest, SelectionChangeDuringHide) {
|
||||
// Press a key to start a search.
|
||||
PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1084,7 +1087,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SelectionChangeDuringHide) {
|
||||
|
||||
// Verify that clearing search results did not schedule a container update,
|
||||
// and that result view text has not been cleared.
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_FALSE(container->UpdateScheduled());
|
||||
}
|
||||
|
||||
@ -1126,9 +1129,9 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultSelectionCycle) {
|
||||
SetUpSearchResults(results, 1 + kDefaultSearchItems, kDefaultSearchItems, 1,
|
||||
false, SearchResult::Category::kWeb);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1203,14 +1206,14 @@ TEST_P(SearchViewClamshellAndTabletTest, AnswerCardSelection) {
|
||||
SearchResult::Category::kApps);
|
||||
|
||||
// Verify result container ordering.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
SetUpAnswerCardResult(results, 1, 1);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1252,9 +1255,9 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultSelection) {
|
||||
SetUpSearchResults(results, 2 + kDefaultSearchItems, kDefaultSearchItems, 1,
|
||||
false, SearchResult::Category::kWeb);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1314,9 +1317,9 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultPageHiddenInZeroSearchState) {
|
||||
SearchResult::Category::kApps);
|
||||
|
||||
// Verify that containers are not updating if search is not in progress.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_FALSE(container->UpdateScheduled());
|
||||
}
|
||||
|
||||
@ -1332,7 +1335,7 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultPageHiddenInZeroSearchState) {
|
||||
ordered_categories->push_back(AppListSearchResultCategory::kWeb);
|
||||
SetUpSearchResults(results, 1, kDefaultSearchItems, 100, false,
|
||||
SearchResult::Category::kWeb);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1346,7 +1349,7 @@ TEST_P(SearchViewClamshellAndTabletTest, ResultPageHiddenInZeroSearchState) {
|
||||
// Backspace should clear selection, and search box content.
|
||||
PressAndReleaseKey(ui::VKEY_BACK);
|
||||
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_FALSE(container->UpdateScheduled());
|
||||
}
|
||||
|
||||
@ -1365,8 +1368,8 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchResultCategoricalSort) {
|
||||
|
||||
SearchModel::SearchResults* results = test_helper->GetSearchResults();
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
ASSERT_EQ(static_cast<int>(result_containers.size()), kResultContainersCount);
|
||||
|
||||
// Create categorized results and order categories as {kApps, kWeb}.
|
||||
@ -1379,7 +1382,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchResultCategoricalSort) {
|
||||
SearchResult::Category::kApps);
|
||||
SetUpSearchResults(results, 1 + kDefaultSearchItems, kDefaultSearchItems, 1,
|
||||
false, SearchResult::Category::kWeb);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1411,7 +1414,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchResultCategoricalSort) {
|
||||
SetUpSearchResults(results, 1 + kDefaultSearchItems, kDefaultSearchItems, 100,
|
||||
false, SearchResult::Category::kWeb);
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1435,14 +1438,14 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchResultCategoricalSort) {
|
||||
SearchResultListView::SearchResultListType::kApps);
|
||||
|
||||
SetUpAnswerCardResult(results, 1, 1);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
EXPECT_EQ(GetVisibleResultContainers(), (std::vector<size_t>{0, 2, 3}));
|
||||
|
||||
AppListModelProvider::Get()->search_model()->DeleteAllResults();
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
EXPECT_EQ(GetVisibleResultContainers(), (std::vector<size_t>{}));
|
||||
@ -1460,9 +1463,9 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchResultA11y) {
|
||||
// Create |kDefaultSearchItems| new search results for us to cycle through.
|
||||
SetUpSearchResults(results, 1, kDefaultSearchItems, 100, true,
|
||||
SearchResult::Category::kApps);
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1507,9 +1510,9 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchPageA11y) {
|
||||
|
||||
auto* search_view = GetSearchView();
|
||||
// Check result container visibility.
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
search_view->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = search_view->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1524,7 +1527,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchPageA11y) {
|
||||
data.GetStringAttribute(ax::mojom::StringAttribute::kValue));
|
||||
// Create a single search result and and verify A11yNodeData.
|
||||
SetUpSearchResults(results, 1, 1, 100, true, SearchResult::Category::kApps);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
search_view->GetAccessibleNodeData(&data);
|
||||
@ -1534,7 +1537,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchPageA11y) {
|
||||
// Create new search results and and and verify A11yNodeData.
|
||||
SetUpSearchResults(results, 2, kDefaultSearchItems - 1, 100, true,
|
||||
SearchResult::Category::kApps);
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
ui::AXNodeData data2;
|
||||
@ -1555,9 +1558,9 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchClearedOnModelUpdate) {
|
||||
SetUpSearchResults(results, 1, kDefaultSearchItems, 100, true,
|
||||
SearchResult::Category::kApps);
|
||||
|
||||
std::vector<SearchResultContainerView*> result_containers =
|
||||
GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
@ -1583,7 +1586,7 @@ TEST_P(SearchViewClamshellAndTabletTest, SearchClearedOnModelUpdate) {
|
||||
SetUpSearchResults(search_model_override->results(), 2, 1, 100, true,
|
||||
SearchResult::Category::kApps);
|
||||
result_containers = GetSearchView()->result_container_views_for_test();
|
||||
for (auto* container : result_containers) {
|
||||
for (ash::SearchResultContainerView* container : result_containers) {
|
||||
EXPECT_TRUE(container->RunScheduledUpdateForTest());
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ class WindowDeletionWaiter : aura::WindowObserver {
|
||||
aura::Window* FindMenuWindow(aura::Window* root) {
|
||||
if (root->GetType() == aura::client::WINDOW_TYPE_MENU)
|
||||
return root;
|
||||
for (auto* child : root->children()) {
|
||||
for (aura::Window* child : root->children()) {
|
||||
auto* menu_in_child = FindMenuWindow(child);
|
||||
if (menu_in_child)
|
||||
return menu_in_child;
|
||||
|
@ -108,7 +108,7 @@ class AssistantPageViewLayout : public views::LayoutManagerBase {
|
||||
std::max(preferred_height, host->GetMinimumSize().height());
|
||||
|
||||
// Snap to |kMaxHeightDip| if |child| exceeds |preferred_height|.
|
||||
for (const auto* child : host->children()) {
|
||||
for (const views::View* child : host->children()) {
|
||||
if (child->GetHeightForWidth(width) > preferred_height)
|
||||
return kMaxHeightDip;
|
||||
}
|
||||
@ -128,7 +128,7 @@ class AssistantPageViewLayout : public views::LayoutManagerBase {
|
||||
|
||||
views::ProposedLayout proposed_layout;
|
||||
proposed_layout.host_size = host_view()->size();
|
||||
for (auto* child : host_view()->children()) {
|
||||
for (views::View* child : host_view()->children()) {
|
||||
proposed_layout.child_layouts.push_back(views::ChildLayout{
|
||||
child, child->GetVisible(), bounds, views::SizeBounds()});
|
||||
}
|
||||
|
@ -112,12 +112,13 @@ class FocusChangeListenerStub : public views::FocusChangeListener {
|
||||
}
|
||||
|
||||
// Returns all views that received the focus at some point.
|
||||
const std::vector<views::View*>& focused_views() const {
|
||||
const std::vector<raw_ptr<views::View, VectorExperimental>>& focused_views()
|
||||
const {
|
||||
return focused_views_;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<views::View*> focused_views_;
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> focused_views_;
|
||||
raw_ptr<views::FocusManager, ExperimentalAsh> focus_manager_;
|
||||
};
|
||||
|
||||
|
@ -232,7 +232,7 @@ class ASH_EXPORT ContentsView : public views::View,
|
||||
nullptr;
|
||||
|
||||
// The child page views. Owned by the views hierarchy.
|
||||
std::vector<AppListPage*> app_list_pages_;
|
||||
std::vector<raw_ptr<AppListPage, VectorExperimental>> app_list_pages_;
|
||||
|
||||
// Owned by the views hierarchy.
|
||||
const raw_ptr<AppListView, ExperimentalAsh> app_list_view_;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "ash/session/session_controller_impl.h"
|
||||
#include "ash/shell.h"
|
||||
#include "ash/test/ash_test_base.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/test/metrics/histogram_tester.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
@ -1450,7 +1451,7 @@ TEST_P(ContinueSectionViewTest, InitialShowDoesNotAnimate) {
|
||||
InitializeForAnimationTest(/*result_count=*/5);
|
||||
ASSERT_EQ(4u, initial_bounds.size());
|
||||
|
||||
std::vector<views::View*> container_children =
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
GetContinueSectionView()->suggestions_container()->children();
|
||||
ASSERT_EQ(4u, container_children.size());
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@ -1467,7 +1468,7 @@ TEST_P(ContinueSectionViewTest, UpdateWithNoChangesDoesNotAnimate) {
|
||||
GetContinueSectionView()->suggestions_container()->Update();
|
||||
base::RunLoop().RunUntilIdle();
|
||||
|
||||
std::vector<views::View*> container_children =
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
GetContinueSectionView()->suggestions_container()->children();
|
||||
ASSERT_EQ(4u, container_children.size());
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@ -1487,7 +1488,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenLastItemReplaced) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1544,7 +1546,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenFirstItemRemoved) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1607,7 +1610,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenSecondItemRemoved) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1677,7 +1681,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenThirdItemRemoved) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1752,7 +1757,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenItemInserted) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1830,7 +1836,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenTwoItemsRemoved) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
@ -1910,7 +1917,8 @@ TEST_P(ContinueSectionViewTest, ResultRemovedMidAnimation) {
|
||||
GetResults()->DeleteAt(1);
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 4, container_children.size());
|
||||
|
||||
@ -1989,7 +1997,8 @@ TEST_P(ContinueSectionViewTest, ContinueSectionHiddenMidAnimation) {
|
||||
container_view->Update();
|
||||
|
||||
EXPECT_FALSE(GetContinueSectionView()->GetVisible());
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
ASSERT_EQ(1u, container_children.size());
|
||||
EXPECT_FALSE(container_children[0]->layer()->GetAnimator()->is_animating());
|
||||
}
|
||||
@ -2005,7 +2014,8 @@ TEST_P(ContinueSectionViewTest, AnimatesWhenNumberOfChipsChanges) {
|
||||
GetContinueSectionView()->suggestions_container();
|
||||
container_view->Update();
|
||||
|
||||
std::vector<views::View*> container_children = container_view->children();
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> container_children =
|
||||
container_view->children();
|
||||
const size_t new_views_start = 4;
|
||||
ASSERT_EQ(new_views_start + 3, container_children.size());
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "ash/public/cpp/app_list/app_list_notifier.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "base/check.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -378,7 +379,7 @@ void ContinueTaskContainerView::ScheduleContainerUpdateAnimation(
|
||||
animation_builder.GetCurrentSequence().At(delay).SetDuration(
|
||||
base::Milliseconds(300));
|
||||
|
||||
for (auto* view : suggestion_tasks_views_) {
|
||||
for (ash::ContinueTaskView* view : suggestion_tasks_views_) {
|
||||
const std::string& result_id = view->result()->id();
|
||||
// If view remained in place, it does not need to be animated in.
|
||||
auto view_remaining_in_place_it = views_remaining_in_place.find(result_id);
|
||||
@ -403,8 +404,9 @@ void ContinueTaskContainerView::ScheduleContainerUpdateAnimation(
|
||||
}
|
||||
|
||||
void ContinueTaskContainerView::AbortTasksUpdateAnimations() {
|
||||
for (auto* view : suggestion_tasks_views_)
|
||||
for (ash::ContinueTaskView* view : suggestion_tasks_views_) {
|
||||
view->layer()->GetAnimator()->StopAnimating();
|
||||
}
|
||||
ClearAnimatingViews();
|
||||
}
|
||||
|
||||
@ -413,10 +415,11 @@ void ContinueTaskContainerView::ClearAnimatingViews() {
|
||||
// case view removal causes an aborted view animation that calls back into
|
||||
// `ClearAnimatingViews()`. Clearing `views_to_remove_after_animation_` mid
|
||||
// iteraion over the vector would not be safe.
|
||||
std::vector<ContinueTaskView*> views_to_remove;
|
||||
std::vector<raw_ptr<ContinueTaskView, VectorExperimental>> views_to_remove;
|
||||
views_to_remove_after_animation_.swap(views_to_remove);
|
||||
for (auto* view : views_to_remove)
|
||||
for (ash::ContinueTaskView* view : views_to_remove) {
|
||||
RemoveChildViewT(view);
|
||||
}
|
||||
|
||||
NotifyAccessibilityEvent(ax::mojom::Event::kChildrenChanged, true);
|
||||
}
|
||||
@ -469,7 +472,7 @@ void ContinueTaskContainerView::AnimateSlideInSuggestions(
|
||||
views::AnimationBuilder animation_builder;
|
||||
animation_builder.Once().SetDuration(duration);
|
||||
|
||||
for (auto* view : suggestion_tasks_views_) {
|
||||
for (ash::ContinueTaskView* view : suggestion_tasks_views_) {
|
||||
animation_builder.GetCurrentSequence()
|
||||
.SetTransform(view, gfx::Transform(), tween)
|
||||
.SetOpacity(view, 1.0f, tween);
|
||||
|
@ -181,7 +181,8 @@ class ASH_EXPORT ContinueTaskContainerView : public ui::ListModelObserver,
|
||||
raw_ptr<views::TableLayout, ExperimentalAsh> table_layout_ = nullptr;
|
||||
|
||||
// The list of tasks views for the container.
|
||||
std::vector<ContinueTaskView*> suggestion_tasks_views_;
|
||||
std::vector<raw_ptr<ContinueTaskView, VectorExperimental>>
|
||||
suggestion_tasks_views_;
|
||||
|
||||
// The number of results shown in the container. Each result has one view.
|
||||
size_t num_results_ = 0;
|
||||
@ -207,7 +208,8 @@ class ASH_EXPORT ContinueTaskContainerView : public ui::ListModelObserver,
|
||||
// of results shown in the container gets updated. The views are only still
|
||||
// needed for the update animation and should be removed once the animation
|
||||
// completes.
|
||||
std::vector<ContinueTaskView*> views_to_remove_after_animation_;
|
||||
std::vector<raw_ptr<ContinueTaskView, VectorExperimental>>
|
||||
views_to_remove_after_animation_;
|
||||
|
||||
// Timer which when active disables container update animations. The timer
|
||||
// gets started when the container gets shown. The goal is to disable update
|
||||
|
@ -176,7 +176,7 @@ void PageSwitcher::OnThemeChanged() {
|
||||
views::View::OnThemeChanged();
|
||||
if (!buttons_)
|
||||
return;
|
||||
for (auto* child : buttons_->children()) {
|
||||
for (views::View* child : buttons_->children()) {
|
||||
if (child->GetVisible())
|
||||
child->SchedulePaint();
|
||||
}
|
||||
|
@ -198,8 +198,9 @@ void RecentAppsView::OnAppListItemWillBeDeleted(AppListItem* item) {
|
||||
void RecentAppsView::UpdateAppListConfig(const AppListConfig* app_list_config) {
|
||||
app_list_config_ = app_list_config;
|
||||
|
||||
for (auto* item_view : item_views_)
|
||||
for (ash::AppListItemView* item_view : item_views_) {
|
||||
item_view->UpdateAppListConfig(app_list_config);
|
||||
}
|
||||
}
|
||||
|
||||
void RecentAppsView::UpdateResults(
|
||||
|
@ -103,7 +103,7 @@ class ASH_EXPORT RecentAppsView : public AppListModelObserver,
|
||||
|
||||
// The recent app items. Stored here because this view has child views for
|
||||
// spacing that are not AppListItemViews.
|
||||
std::vector<AppListItemView*> item_views_;
|
||||
std::vector<raw_ptr<AppListItemView, VectorExperimental>> item_views_;
|
||||
};
|
||||
|
||||
} // namespace ash
|
||||
|
@ -38,7 +38,7 @@ namespace {
|
||||
aura::Window* FindMenuWindow(aura::Window* root) {
|
||||
if (root->GetType() == aura::client::WINDOW_TYPE_MENU)
|
||||
return root;
|
||||
for (auto* child : root->children()) {
|
||||
for (aura::Window* child : root->children()) {
|
||||
auto* menu_in_child = FindMenuWindow(child);
|
||||
if (menu_in_child)
|
||||
return menu_in_child;
|
||||
|
@ -21,7 +21,8 @@ class SearchResultContainerView;
|
||||
|
||||
// This alias is intended to clarify the intended use of this class within the
|
||||
// context of this controller.
|
||||
using ResultSelectionModel = std::vector<SearchResultContainerView*>;
|
||||
using ResultSelectionModel =
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>;
|
||||
|
||||
// Stores and organizes the details for the 'coordinates' of the selected
|
||||
// result. This includes all information to determine exactly where a result is,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ash/app_list/views/search_result_container_view.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "ui/events/event.h"
|
||||
|
||||
@ -633,7 +634,8 @@ class ResultSelectionTest : public testing::Test,
|
||||
|
||||
std::unique_ptr<test::AppListTestViewDelegate> app_list_test_delegate_;
|
||||
std::unique_ptr<ResultSelectionController> result_selection_controller_;
|
||||
std::vector<SearchResultContainerView*> containers_;
|
||||
std::vector<raw_ptr<SearchResultContainerView, VectorExperimental>>
|
||||
containers_;
|
||||
|
||||
// Set up key events for test. These will never be marked as 'handled'.
|
||||
ui::KeyEvent down_arrow_ =
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "ash/style/ash_color_id.h"
|
||||
#include "ash/style/typography.h"
|
||||
#include "base/i18n/time_formatting.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/l10n/time_format.h"
|
||||
@ -191,7 +192,7 @@ SearchResultImageView* SearchResultImageListView::GetResultViewAt(
|
||||
return image_views_[index];
|
||||
}
|
||||
|
||||
std::vector<SearchResultImageView*>
|
||||
std::vector<raw_ptr<SearchResultImageView, VectorExperimental>>
|
||||
SearchResultImageListView::GetSearchResultImageViews() {
|
||||
return image_views_;
|
||||
}
|
||||
@ -202,7 +203,7 @@ void SearchResultImageListView::ConfigureLayoutForAvailableWidth(int width) {
|
||||
kSpaceBetweenImages * (image_count - 1);
|
||||
const int image_width = std::max(0, (width - margin_space) / image_count);
|
||||
|
||||
for (auto* image_view : image_views_) {
|
||||
for (ash::SearchResultImageView* image_view : image_views_) {
|
||||
image_view->ConfigureLayoutForAvailableWidth(image_width);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ class ASH_EXPORT SearchResultImageListView : public SearchResultContainerView {
|
||||
SearchResultImageView* GetResultViewAt(size_t index) override;
|
||||
|
||||
// Returns all search result image views children of this view.
|
||||
std::vector<SearchResultImageView*> GetSearchResultImageViews();
|
||||
std::vector<raw_ptr<SearchResultImageView, VectorExperimental>>
|
||||
GetSearchResultImageViews();
|
||||
|
||||
// Returns the preferred width of the image search result according to the
|
||||
// layout.
|
||||
@ -53,7 +54,8 @@ class ASH_EXPORT SearchResultImageListView : public SearchResultContainerView {
|
||||
const views::FlexLayoutView* image_info_container_for_test() const {
|
||||
return image_info_container_.get();
|
||||
}
|
||||
const std::vector<views::Label*>& metadata_content_labels_for_test() const {
|
||||
const std::vector<raw_ptr<views::Label, VectorExperimental>>&
|
||||
metadata_content_labels_for_test() const {
|
||||
return metadata_content_labels_;
|
||||
}
|
||||
|
||||
@ -74,12 +76,13 @@ class ASH_EXPORT SearchResultImageListView : public SearchResultContainerView {
|
||||
raw_ptr<views::FlexLayoutView> image_view_container_ = nullptr;
|
||||
raw_ptr<views::FlexLayoutView> image_info_container_ = nullptr;
|
||||
|
||||
std::vector<SearchResultImageView*> image_views_;
|
||||
std::vector<raw_ptr<SearchResultImageView, VectorExperimental>> image_views_;
|
||||
|
||||
// Labels that show the file metadata in `image_info_container_`. There should
|
||||
// always be 3 labels, which in the order of {file name, file directory, date
|
||||
// modified}.
|
||||
std::vector<views::Label*> metadata_content_labels_;
|
||||
std::vector<raw_ptr<views::Label, VectorExperimental>>
|
||||
metadata_content_labels_;
|
||||
|
||||
base::WeakPtrFactory<SearchResultImageListView> weak_ptr_factory_{this};
|
||||
};
|
||||
|
@ -148,7 +148,8 @@ class ASH_EXPORT SearchResultListView : public SearchResultContainerView {
|
||||
|
||||
raw_ptr<views::View, ExperimentalAsh> results_container_;
|
||||
|
||||
std::vector<SearchResultView*> search_result_views_; // Not owned.
|
||||
std::vector<raw_ptr<SearchResultView, VectorExperimental>>
|
||||
search_result_views_; // Not owned.
|
||||
|
||||
// The SearchResultListViewType dictates what kinds of results will be shown.
|
||||
std::optional<SearchResultListType> list_type_ =
|
||||
|
@ -122,7 +122,7 @@ class SearchResultListViewTest : public views::test::WidgetTest {
|
||||
|
||||
std::vector<SearchResultView*> GetAssistantResultViews() const {
|
||||
std::vector<SearchResultView*> results;
|
||||
for (auto* view : default_view_->search_result_views_) {
|
||||
for (ash::SearchResultView* view : default_view_->search_result_views_) {
|
||||
auto* result = view->result();
|
||||
if (result &&
|
||||
result->result_type() == AppListSearchResultType::kAssistantText)
|
||||
|
@ -60,7 +60,8 @@ class APP_MENU_EXPORT NotificationOverflowView : public views::View {
|
||||
raw_ptr<views::MenuSeparator, ExperimentalAsh> separator_;
|
||||
|
||||
// The list of overflow icons. Listed in right to left ordering.
|
||||
std::vector<NotificationOverflowImageView*> image_views_;
|
||||
std::vector<raw_ptr<NotificationOverflowImageView, VectorExperimental>>
|
||||
image_views_;
|
||||
|
||||
// The overflow icon shown when there are more than |kMaxOverflowIcons|
|
||||
// notifications.
|
||||
|
@ -43,7 +43,7 @@ class NotificationOverflowViewTest : public views::ViewsTestBase {
|
||||
// shown in the overflow. Does not include the overflow icon.
|
||||
void CheckNumberOfNotificationIcons(int expected_notification_icons) {
|
||||
int actual_notification_icons = 0;
|
||||
for (auto* v : notification_overflow_view_->GetChildrenInZOrder()) {
|
||||
for (views::View* v : notification_overflow_view_->GetChildrenInZOrder()) {
|
||||
if (!v->GetVisible() || v->GetID() != kNotificationOverflowIconId)
|
||||
continue;
|
||||
|
||||
@ -54,7 +54,7 @@ class NotificationOverflowViewTest : public views::ViewsTestBase {
|
||||
|
||||
// Returns whether the overflow icon is being shown.
|
||||
bool HasOverflowIcon() {
|
||||
for (auto* v : notification_overflow_view_->GetChildrenInZOrder()) {
|
||||
for (views::View* v : notification_overflow_view_->GetChildrenInZOrder()) {
|
||||
if (v->GetID() != kOverflowIconId)
|
||||
continue;
|
||||
|
||||
|
@ -27,7 +27,7 @@ void StackLayout::ViewRemoved(views::View* host, views::View* view) {
|
||||
|
||||
gfx::Size StackLayout::GetPreferredSize(const views::View* host) const {
|
||||
return std::accumulate(host->children().cbegin(), host->children().cend(),
|
||||
gfx::Size(), [](gfx::Size size, const auto* v) {
|
||||
gfx::Size(), [](gfx::Size size, const views::View* v) {
|
||||
size.SetToMax(v->GetPreferredSize());
|
||||
return size;
|
||||
});
|
||||
@ -49,7 +49,7 @@ void StackLayout::Layout(views::View* host) {
|
||||
const int host_width = host->GetContentsBounds().width();
|
||||
const int host_height = host->GetContentsBounds().height();
|
||||
|
||||
for (auto* child : host->children()) {
|
||||
for (views::View* child : host->children()) {
|
||||
int child_width = host_width;
|
||||
int child_height = host_height;
|
||||
|
||||
|
@ -73,8 +73,9 @@ void FindDescendentByClassName(views::View* parent, T** result) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto* child : candidate->children())
|
||||
for (views::View* child : candidate->children()) {
|
||||
children.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,8 +118,9 @@ void AssistantProgressIndicator::VisibilityChanged(views::View* starting_from,
|
||||
|
||||
if (!is_drawn_) {
|
||||
// Stop all animations.
|
||||
for (auto* child : children())
|
||||
for (views::View* child : children()) {
|
||||
child->layer()->GetAnimator()->StopAnimating();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -140,7 +141,7 @@ void AssistantProgressIndicator::VisibilityChanged(views::View* starting_from,
|
||||
return;
|
||||
|
||||
base::TimeDelta start_offset;
|
||||
for (auto* child : children()) {
|
||||
for (views::View* child : children()) {
|
||||
if (!start_offset.is_zero()) {
|
||||
// Schedule the animations to start after an offset.
|
||||
child->layer()->GetAnimator()->SchedulePauseForProperties(
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "ash/wm/tablet_mode/scoped_skip_user_session_blocked_check.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/scoped_observation.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
#include "ui/compositor/layer_animation_observer.h"
|
||||
@ -147,7 +148,7 @@ bool WaitForLauncherAnimation(base::OnceClosure closure) {
|
||||
|
||||
} // namespace
|
||||
|
||||
std::vector<aura::Window*> GetAppWindowList() {
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> GetAppWindowList() {
|
||||
ScopedSkipUserSessionBlockedCheck skip_session_blocked;
|
||||
return Shell::Get()->mru_window_tracker()->BuildAppWindowList(kAllDesks);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ views::ProposedLayout SimpleGridLayout::CalculateProposedLayout(
|
||||
gfx::Size size = GetChildPreferredSize();
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
for (auto* child : host_view()->children()) {
|
||||
for (views::View* child : host_view()->children()) {
|
||||
if (!IsChildIncludedInLayout(child))
|
||||
continue;
|
||||
|
||||
@ -71,7 +71,7 @@ gfx::Size SimpleGridLayout::GetChildPreferredSize() const {
|
||||
|
||||
gfx::Size SimpleGridLayout::CalculatePreferredSize() const {
|
||||
int total_children = 0;
|
||||
for (auto* child : host_view()->children()) {
|
||||
for (views::View* child : host_view()->children()) {
|
||||
if (IsChildIncludedInLayout(child))
|
||||
++total_children;
|
||||
}
|
||||
|
@ -210,9 +210,9 @@ gfx::Rect GetCollisionAvoidanceRect(aura::Window* root_window) {
|
||||
unified_system_tray->IsBubbleShown()) {
|
||||
collision_avoidance_rect = unified_system_tray->GetBubbleBoundsInScreen();
|
||||
} else {
|
||||
const std::vector<TrayBackgroundView*> tray_buttons =
|
||||
status_area_widget->tray_buttons();
|
||||
for (auto* tray_button : tray_buttons) {
|
||||
const std::vector<raw_ptr<TrayBackgroundView, VectorExperimental>>
|
||||
tray_buttons = status_area_widget->tray_buttons();
|
||||
for (ash::TrayBackgroundView* tray_button : tray_buttons) {
|
||||
if (views::Widget* tray_bubble_widget = tray_button->GetBubbleWidget();
|
||||
tray_bubble_widget && tray_bubble_widget->IsVisible()) {
|
||||
collision_avoidance_rect.Union(
|
||||
@ -249,7 +249,7 @@ void UpdateFloatingPanelBoundsIfNeeded(aura::Window* root_window) {
|
||||
// with the current configuration.
|
||||
gfx::Size CalculatePreviewInitialSize() {
|
||||
int max_shorter_side = 0;
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
const auto work_area = display::Screen::GetScreen()
|
||||
->GetDisplayNearestWindow(root_window)
|
||||
.work_area();
|
||||
|
@ -3586,7 +3586,7 @@ TEST_P(CaptureModeCameraPreviewTest, MultiDisplayResize) {
|
||||
StartCaptureSessionWithParam();
|
||||
auto* controller = CaptureModeController::Get();
|
||||
auto* session = controller->capture_mode_session();
|
||||
auto* display_2_root = Shell::GetAllRootWindows()[1];
|
||||
auto* display_2_root = Shell::GetAllRootWindows()[1].get();
|
||||
|
||||
// When capturing a window, set its bounds such that it is placed on the
|
||||
// secondary display.
|
||||
|
@ -406,7 +406,7 @@ void CaptureModeMenuGroup::AddOrUpdateExistingOption(
|
||||
}
|
||||
|
||||
void CaptureModeMenuGroup::RefreshOptionsSelections() {
|
||||
for (auto* option : options_) {
|
||||
for (ash::CaptureModeOption* option : options_) {
|
||||
option->SetOptionChecked(delegate_->IsOptionChecked(option->id()));
|
||||
option->SetEnabled(delegate_->IsOptionEnabled(option->id()));
|
||||
}
|
||||
@ -449,12 +449,13 @@ void CaptureModeMenuGroup::AppendHighlightableItems(
|
||||
|
||||
if (menu_header_)
|
||||
highlightable_items.push_back(menu_header_);
|
||||
for (auto* option : options_) {
|
||||
for (ash::CaptureModeOption* option : options_) {
|
||||
if (option->GetEnabled())
|
||||
highlightable_items.push_back(option);
|
||||
}
|
||||
for (auto* menu_item : menu_items_)
|
||||
for (ash::CaptureModeMenuItem* menu_item : menu_items_) {
|
||||
highlightable_items.push_back(menu_item);
|
||||
}
|
||||
}
|
||||
|
||||
views::View* CaptureModeMenuGroup::GetOptionForTesting(int option_id) {
|
||||
|
@ -152,7 +152,7 @@ class ASH_EXPORT CaptureModeMenuGroup : public views::View {
|
||||
|
||||
// Options added via calls "AddOption()". Options are owned by theirs views
|
||||
// hierarchy.
|
||||
std::vector<CaptureModeOption*> options_;
|
||||
std::vector<raw_ptr<CaptureModeOption, VectorExperimental>> options_;
|
||||
|
||||
// It's a container view for |options_|. It's owned by its views hierarchy.
|
||||
// We need it for grouping up options. For example, when user selects a custom
|
||||
@ -161,7 +161,7 @@ class ASH_EXPORT CaptureModeMenuGroup : public views::View {
|
||||
raw_ptr<views::View, ExperimentalAsh> options_container_;
|
||||
|
||||
// Menu items added by calling AddMenuItem().
|
||||
std::vector<CaptureModeMenuItem*> menu_items_;
|
||||
std::vector<raw_ptr<CaptureModeMenuItem, VectorExperimental>> menu_items_;
|
||||
};
|
||||
|
||||
} // namespace ash
|
||||
|
@ -2832,7 +2832,7 @@ void CaptureModeSession::InitInternal() {
|
||||
if (auto* capture_client = aura::client::GetCaptureClient(current_root_)) {
|
||||
input_capture_window_ = capture_client->GetCaptureWindow();
|
||||
if (input_capture_window_) {
|
||||
aura::WindowTracker tracker({input_capture_window_});
|
||||
aura::WindowTracker tracker({input_capture_window_.get()});
|
||||
capture_client->ReleaseCapture(input_capture_window_);
|
||||
if (tracker.windows().empty()) {
|
||||
input_capture_window_ = nullptr;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "ash/wm/window_state.h"
|
||||
#include "base/containers/flat_map.h"
|
||||
#include "base/containers/flat_set.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "chromeos/ui/base/chromeos_ui_constants.h"
|
||||
#include "ui/base/class_property.h"
|
||||
@ -67,7 +68,8 @@ constexpr int kIntersectingWindowOutset =
|
||||
chromeos::kResizeOutsideBoundsSize + 1;
|
||||
constexpr int kWindowOfInterestInset = 1;
|
||||
|
||||
std::vector<aura::Window*> GetWindowListIgnoreModalForActiveDesk() {
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>>
|
||||
GetWindowListIgnoreModalForActiveDesk() {
|
||||
return Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(
|
||||
DesksMruType::kActiveDesk);
|
||||
}
|
||||
@ -463,7 +465,7 @@ CaptureModeSessionFocusCycler::CaptureModeSessionFocusCycler(
|
||||
session_(session),
|
||||
scoped_a11y_overrider_(
|
||||
std::make_unique<ScopedA11yOverrideWindowSetter>()) {
|
||||
for (auto* window : GetWindowListIgnoreModalForActiveDesk()) {
|
||||
for (aura::Window* window : GetWindowListIgnoreModalForActiveDesk()) {
|
||||
if (!IsCaptureWindowSelectable(window))
|
||||
continue;
|
||||
highlightable_windows_.emplace(
|
||||
@ -852,12 +854,12 @@ CaptureModeSessionFocusCycler::GetGroupItems(FocusGroup group) const {
|
||||
break;
|
||||
}
|
||||
case FocusGroup::kCaptureWindow: {
|
||||
const std::vector<aura::Window*> windows =
|
||||
const std::vector<raw_ptr<aura::Window, VectorExperimental>> windows =
|
||||
GetWindowListIgnoreModalForActiveDesk();
|
||||
if (!windows.empty()) {
|
||||
const std::vector<HighlightableView*> camera_items =
|
||||
GetGroupItems(FocusGroup::kCameraPreview);
|
||||
for (auto* window : windows) {
|
||||
for (aura::Window* window : windows) {
|
||||
auto iter = highlightable_windows_.find(window);
|
||||
if (iter != highlightable_windows_.end()) {
|
||||
items.push_back(iter->second.get());
|
||||
|
@ -3764,7 +3764,8 @@ TEST_F(CaptureModeTest, KeyboardNavigationBasic) {
|
||||
// mode.
|
||||
TEST_F(CaptureModeTest, KeyboardNavigationTabThroughWindowsOnMultipleDisplays) {
|
||||
UpdateDisplay("800x700,801+0-800x700");
|
||||
std::vector<aura::Window*> root_windows = Shell::GetAllRootWindows();
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> root_windows =
|
||||
Shell::GetAllRootWindows();
|
||||
ASSERT_EQ(2u, root_windows.size());
|
||||
|
||||
// Create three windows, one of them is a modal transient child.
|
||||
|
@ -139,7 +139,7 @@ class ModifiersContainerView : public views::View {
|
||||
|
||||
private:
|
||||
void RemoveModifier(ui::KeyboardCode key_code) {
|
||||
for (auto* child : children()) {
|
||||
for (views::View* child : children()) {
|
||||
if (static_cast<KeyItemView*>(child)->key_code() == key_code) {
|
||||
RemoveChildViewT(child);
|
||||
return;
|
||||
|
@ -106,7 +106,7 @@ gfx::Size KeyItemView::CalculatePreferredSize() const {
|
||||
}
|
||||
|
||||
int width = 0;
|
||||
for (const auto* child : children()) {
|
||||
for (const views::View* child : children()) {
|
||||
const auto child_size = child->GetPreferredSize();
|
||||
width += child_size.width();
|
||||
}
|
||||
|
@ -764,7 +764,7 @@ void VideoRecordingWatcher::UpdateLayerStackingAndDimmers() {
|
||||
DesksMruType::kAllDesks);
|
||||
bool did_find_recorded_window = false;
|
||||
// Note that the order of |mru_windows| are from top-most first.
|
||||
for (auto* window : mru_windows) {
|
||||
for (aura::Window* window : mru_windows) {
|
||||
if (window == window_being_recorded_) {
|
||||
did_find_recorded_window = true;
|
||||
continue;
|
||||
|
@ -233,8 +233,9 @@ void ColorEnhancementController::OnRootWindowAdded(aura::Window* root_window) {
|
||||
}
|
||||
|
||||
void ColorEnhancementController::UpdateAllDisplays() {
|
||||
for (auto* root_window : Shell::GetAllRootWindows())
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
UpdateDisplay(root_window);
|
||||
}
|
||||
}
|
||||
|
||||
void ColorEnhancementController::UpdateDisplay(aura::Window* root_window) {
|
||||
|
@ -48,11 +48,11 @@ TEST_F(ColorEnhancementControllerTest, HighContrast) {
|
||||
PrefService* prefs = GetPrefs();
|
||||
prefs->SetBoolean(prefs::kAccessibilityHighContrastEnabled, true);
|
||||
EXPECT_TRUE(IsCursorCompositingEnabled());
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_TRUE(root_window->layer()->layer_inverted());
|
||||
}
|
||||
prefs->SetBoolean(prefs::kAccessibilityHighContrastEnabled, false);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FALSE(root_window->layer()->layer_inverted());
|
||||
}
|
||||
EXPECT_FALSE(IsCursorCompositingEnabled());
|
||||
@ -65,7 +65,7 @@ TEST_F(ColorEnhancementControllerTest, Greyscale) {
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionType,
|
||||
ColorVisionCorrectionType::kGrayscale);
|
||||
EXPECT_FALSE(IsCursorCompositingEnabled());
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.f, root_window->layer()->layer_grayscale());
|
||||
// No other color filters were set.
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
@ -73,14 +73,14 @@ TEST_F(ColorEnhancementControllerTest, Greyscale) {
|
||||
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 100);
|
||||
EXPECT_FALSE(IsCursorCompositingEnabled());
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(1, root_window->layer()->layer_grayscale());
|
||||
// No other color filters were set.
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 50);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.5f, root_window->layer()->layer_grayscale());
|
||||
// No other color filters were set.
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
@ -88,14 +88,14 @@ TEST_F(ColorEnhancementControllerTest, Greyscale) {
|
||||
|
||||
// Greyscale larger than 100% or smaller than 0% does nothing.
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 500);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.5f, root_window->layer()->layer_grayscale());
|
||||
// No other color filters were set.
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, -10);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.5f, root_window->layer()->layer_grayscale());
|
||||
// No other color filters were set.
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
@ -112,20 +112,20 @@ TEST_F(ColorEnhancementControllerTest, ColorVisionCorrectionFilters) {
|
||||
|
||||
// With severity at 0, no matrix should be applied.
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 0);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
EXPECT_FLOAT_EQ(0.f, root_window->layer()->layer_grayscale());
|
||||
}
|
||||
|
||||
// With a non-zero severity, a matrix should be applied.
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 50);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_TRUE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
// Grayscale was not impacted.
|
||||
EXPECT_FLOAT_EQ(0.f, root_window->layer()->layer_grayscale());
|
||||
}
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionAmount, 100);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
const cc::FilterOperation::Matrix* matrix =
|
||||
root_window->layer()->GetLayerCustomColorMatrix();
|
||||
EXPECT_TRUE(matrix);
|
||||
@ -153,14 +153,14 @@ TEST_F(ColorEnhancementControllerTest, GrayscaleBehindColorCorrectionOption) {
|
||||
ColorVisionCorrectionType::kGrayscale);
|
||||
|
||||
// Default values.
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.0f, root_window->layer()->layer_grayscale());
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
|
||||
// Turn on color filtering, values should now be from prefs.
|
||||
prefs->SetBoolean(prefs::kAccessibilityColorCorrectionEnabled, true);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.5f, root_window->layer()->layer_grayscale());
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
@ -168,14 +168,14 @@ TEST_F(ColorEnhancementControllerTest, GrayscaleBehindColorCorrectionOption) {
|
||||
prefs->SetInteger(prefs::kAccessibilityColorVisionCorrectionType,
|
||||
ColorVisionCorrectionType::kDeuteranomaly);
|
||||
prefs->SetBoolean(prefs::kAccessibilityColorCorrectionEnabled, true);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.0f, root_window->layer()->layer_grayscale());
|
||||
EXPECT_TRUE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
|
||||
// Turn it off again, expect defaults to be restored.
|
||||
prefs->SetBoolean(prefs::kAccessibilityColorCorrectionEnabled, false);
|
||||
for (auto* root_window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : Shell::GetAllRootWindows()) {
|
||||
EXPECT_FLOAT_EQ(0.0f, root_window->layer()->layer_grayscale());
|
||||
EXPECT_FALSE(root_window->layer()->LayerHasCustomColorMatrix());
|
||||
}
|
||||
|
@ -1105,7 +1105,7 @@ void ArcNetHostImpl::AddPasspointCredentials(
|
||||
|
||||
aura::Window* ArcNetHostImpl::GetAppWindow(const std::string& package_name) {
|
||||
std::queue<aura::Window*> windows = {};
|
||||
for (auto* window : ash::Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* window : ash::Shell::GetAllRootWindows()) {
|
||||
windows.push(window);
|
||||
}
|
||||
while (!windows.empty()) {
|
||||
@ -1114,7 +1114,7 @@ aura::Window* ArcNetHostImpl::GetAppWindow(const std::string& package_name) {
|
||||
if (!window) {
|
||||
continue;
|
||||
}
|
||||
for (auto* child_window : window->children()) {
|
||||
for (aura::Window* child_window : window->children()) {
|
||||
windows.push(child_window);
|
||||
}
|
||||
const std::string* app_id = window->GetProperty(ash::kAppIDKey);
|
||||
|
@ -165,7 +165,7 @@ Session::~Session() {
|
||||
}
|
||||
|
||||
void Session::CurtainOffAllRootWindows() {
|
||||
for (auto* root_window : shell_->GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : shell_->GetAllRootWindows()) {
|
||||
CurtainOffRootWindow(root_window);
|
||||
}
|
||||
}
|
||||
@ -185,7 +185,7 @@ void Session::CurtainOffRootWindow(aura::Window* root_window) {
|
||||
}
|
||||
|
||||
void Session::RemoveCurtainOfAllRootWindows() {
|
||||
for (auto* root_window : shell_->GetAllRootWindows()) {
|
||||
for (aura::Window* root_window : shell_->GetAllRootWindows()) {
|
||||
RemoveCurtainOfRootWindow(root_window);
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "ash/wm/window_properties.h"
|
||||
#include "ash/wm/window_state.h"
|
||||
#include "ash/wm/window_util.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "cc/debug/layer_tree_debug_state.h"
|
||||
#include "ui/accessibility/aura/aura_window_properties.h"
|
||||
#include "ui/aura/client/aura_constants.h"
|
||||
@ -131,7 +132,7 @@ void PrintWindowHierarchy(const aura::Window* active_window,
|
||||
views::PrintWidgetInformation(*widget, /*detailed*/ false, out);
|
||||
}
|
||||
|
||||
std::vector<aura::Window*> children =
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> children =
|
||||
instance ? instance->GetAdjustedWindowChildren(window)
|
||||
: window->children();
|
||||
for (aura::Window* child : children) {
|
||||
@ -158,7 +159,7 @@ std::vector<std::string> PrintWindowHierarchy(std::ostringstream* out,
|
||||
void ToggleShowDebugBorders() {
|
||||
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
|
||||
std::unique_ptr<cc::DebugBorderTypes> value;
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
ui::Compositor* compositor = window->GetHost()->compositor();
|
||||
cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
|
||||
if (!value.get())
|
||||
@ -172,7 +173,7 @@ void ToggleShowDebugBorders() {
|
||||
void ToggleShowFpsCounter() {
|
||||
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
|
||||
std::unique_ptr<bool> value;
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
ui::Compositor* compositor = window->GetHost()->compositor();
|
||||
cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
|
||||
if (!value.get())
|
||||
@ -185,7 +186,7 @@ void ToggleShowFpsCounter() {
|
||||
void ToggleShowPaintRects() {
|
||||
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
|
||||
std::unique_ptr<bool> value;
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
ui::Compositor* compositor = window->GetHost()->compositor();
|
||||
cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
|
||||
if (!value.get())
|
||||
|
@ -220,7 +220,8 @@ void ColorMatrixVectorFromSrgbToDeviceAndColorMatrix(
|
||||
|
||||
bool HasColorCorrectionMatrix(display::DisplayConfigurator* configurator,
|
||||
int64_t display_id) {
|
||||
for (const auto* display_snapshot : configurator->cached_displays()) {
|
||||
for (const display::DisplaySnapshot* display_snapshot :
|
||||
configurator->cached_displays()) {
|
||||
if (display_snapshot->display_id() != display_id)
|
||||
continue;
|
||||
|
||||
@ -263,7 +264,8 @@ bool DisplayColorManager::SetDisplayColorTemperatureAdjustment(
|
||||
// Look up the calibration matrix, if one exists.
|
||||
SkM44 srgb_to_device_matrix;
|
||||
{
|
||||
for (const auto* display_snapshot : configurator_->cached_displays()) {
|
||||
for (const display::DisplaySnapshot* display_snapshot :
|
||||
configurator_->cached_displays()) {
|
||||
if (display_snapshot->display_id() != display_id) {
|
||||
continue;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ void DisplayErrorObserver::OnDisplayModeChangeFailed(
|
||||
display::MultipleDisplayState new_state) {
|
||||
bool internal_display_failed = false;
|
||||
LOG(ERROR) << "Failed to configure the following display(s):";
|
||||
for (auto* display : displays) {
|
||||
for (display::DisplaySnapshot* display : displays) {
|
||||
const int64_t display_id = display->display_id();
|
||||
internal_display_failed |= display::IsInternalDisplayId(display_id);
|
||||
LOG(ERROR) << "- Display with ID = " << display_id << ", and EDID = "
|
||||
|
@ -2296,7 +2296,7 @@ TEST_F(DisplayManagerTest, CloseDisplayByEvent) {
|
||||
|
||||
auto* mirror_window_controller =
|
||||
Shell::Get()->window_tree_host_manager()->mirror_window_controller();
|
||||
auto* host_root = mirror_window_controller->GetAllRootWindows()[1];
|
||||
auto* host_root = mirror_window_controller->GetAllRootWindows()[1].get();
|
||||
ui::test::EventGenerator generator(host_root);
|
||||
generator.PressAndReleaseKey(ui::VKEY_A);
|
||||
|
||||
|
@ -16,10 +16,10 @@ namespace ash {
|
||||
|
||||
std::vector<aura::WindowTreeHost*> MirrorWindowTestApi::GetHosts() const {
|
||||
std::vector<aura::WindowTreeHost*> hosts;
|
||||
for (auto* window : Shell::Get()
|
||||
->window_tree_host_manager()
|
||||
->mirror_window_controller()
|
||||
->GetAllRootWindows()) {
|
||||
for (aura::Window* window : Shell::Get()
|
||||
->window_tree_host_manager()
|
||||
->mirror_window_controller()
|
||||
->GetAllRootWindows()) {
|
||||
hosts.emplace_back(window->GetHost());
|
||||
}
|
||||
return hosts;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "ash/session/session_controller_impl.h"
|
||||
#include "ash/shell.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "components/prefs/pref_change_registrar.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@ -25,7 +26,7 @@ display::DisplaySnapshot* GetSupportedDisplay() {
|
||||
const auto& cached_displays =
|
||||
Shell::Get()->display_configurator()->cached_displays();
|
||||
|
||||
for (auto* display : cached_displays) {
|
||||
for (display::DisplaySnapshot* display : cached_displays) {
|
||||
if (display->type() == display::DISPLAY_CONNECTION_TYPE_INTERNAL &&
|
||||
display->privacy_screen_state() != display::kNotSupported &&
|
||||
display->current_mode()) {
|
||||
@ -140,7 +141,8 @@ void PrivacyScreenController::OnSigninScreenPrefServiceInitialized(
|
||||
}
|
||||
|
||||
void PrivacyScreenController::OnDisplayModeChanged(
|
||||
const std::vector<display::DisplaySnapshot*>& displays) {
|
||||
const std::vector<raw_ptr<display::DisplaySnapshot, VectorExperimental>>&
|
||||
displays) {
|
||||
// OnDisplayModeChanged() may fire many times during Chrome's lifetime. We
|
||||
// limit automatic user pref initialization to login screen only.
|
||||
if (!applying_login_screen_prefs_)
|
||||
|
@ -63,7 +63,8 @@ class ASH_EXPORT PrivacyScreenController
|
||||
|
||||
// DisplayConfigurator::Observer:
|
||||
void OnDisplayModeChanged(
|
||||
const std::vector<display::DisplaySnapshot*>& displays) override;
|
||||
const std::vector<raw_ptr<display::DisplaySnapshot, VectorExperimental>>&
|
||||
displays) override;
|
||||
|
||||
private:
|
||||
// Calculates PrivacyScreen's logical status.
|
||||
|
@ -681,7 +681,7 @@ void ScreenOrientationController::ApplyLockForTopMostWindowOnInternalDisplay() {
|
||||
Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(
|
||||
kActiveDesk));
|
||||
|
||||
for (auto* window : mru_windows) {
|
||||
for (aura::Window* window : mru_windows) {
|
||||
if (window->GetRootWindow() != internal_display_root)
|
||||
continue;
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ash/ash_export.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "ui/aura/client/screen_position_client.h"
|
||||
|
||||
namespace ash {
|
||||
@ -23,7 +24,8 @@ class ASH_EXPORT ScreenPositionController
|
||||
// returns the other root window.
|
||||
static void ConvertHostPointToRelativeToRootWindow(
|
||||
aura::Window* root_window,
|
||||
const std::vector<aura::Window*>& root_windows,
|
||||
const std::vector<raw_ptr<aura::Window, VectorExperimental>>&
|
||||
root_windows,
|
||||
gfx::Point* point_in_host,
|
||||
aura::Window** target_window);
|
||||
|
||||
|
@ -142,7 +142,7 @@ class TouchCalibratorControllerTest : public AshTestBase {
|
||||
// Get the correct EventTarget for the given |display|.
|
||||
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
|
||||
ui::EventTarget* event_target = nullptr;
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
if (display::Screen::GetScreen()->GetDisplayNearestWindow(window).id() ==
|
||||
display.id()) {
|
||||
event_target = window;
|
||||
|
@ -3,6 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "ash/drag_drop/tab_drag_drop_windows_hider.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -32,7 +33,7 @@ TabDragDropWindowsHider::TabDragDropWindowsHider(aura::Window* source_window)
|
||||
|
||||
DCHECK(!Shell::Get()->overview_controller()->InOverviewSession());
|
||||
|
||||
std::vector<aura::Window*> windows =
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>> windows =
|
||||
Shell::Get()->mru_window_tracker()->BuildMruWindowList(kActiveDesk);
|
||||
for (aura::Window* window : windows) {
|
||||
if (window == source_window_ || window->GetRootWindow() != root_window_) {
|
||||
|
@ -42,7 +42,7 @@ EventRewriterControllerImpl::EventRewriterControllerImpl() {
|
||||
EventRewriterControllerImpl::~EventRewriterControllerImpl() {
|
||||
aura::Env::GetInstance()->RemoveObserver(this);
|
||||
// Remove the rewriters from every root window EventSource.
|
||||
for (auto* window : Shell::GetAllRootWindows()) {
|
||||
for (aura::Window* window : Shell::GetAllRootWindows()) {
|
||||
auto* event_source = window->GetHost()->GetEventSource();
|
||||
for (const auto& rewriter : rewriters_) {
|
||||
event_source->RemoveEventRewriter(rewriter.get());
|
||||
@ -116,15 +116,17 @@ void EventRewriterControllerImpl::Initialize(
|
||||
void EventRewriterControllerImpl::AddEventRewriter(
|
||||
std::unique_ptr<ui::EventRewriter> rewriter) {
|
||||
// Add the rewriters to each existing root window EventSource.
|
||||
for (auto* window : Shell::GetAllRootWindows())
|
||||
for (aura::Window* window : Shell::GetAllRootWindows()) {
|
||||
window->GetHost()->GetEventSource()->AddEventRewriter(rewriter.get());
|
||||
}
|
||||
|
||||
// In case there are any mirroring displays, their hosts' EventSources won't
|
||||
// be included above.
|
||||
const auto* mirror_window_controller =
|
||||
Shell::Get()->window_tree_host_manager()->mirror_window_controller();
|
||||
for (auto* window : mirror_window_controller->GetAllRootWindows())
|
||||
for (aura::Window* window : mirror_window_controller->GetAllRootWindows()) {
|
||||
window->GetHost()->GetEventSource()->AddEventRewriter(rewriter.get());
|
||||
}
|
||||
|
||||
rewriters_.push_back(std::move(rewriter));
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ bool FastInkPointerController::IsPointerInExcludedWindows(
|
||||
aura::Window* event_target = static_cast<aura::Window*>(event->target());
|
||||
wm::ConvertPointToScreen(event_target, &screen_location);
|
||||
|
||||
for (const auto* excluded_window : excluded_windows_.windows()) {
|
||||
for (const aura::Window* excluded_window : excluded_windows_.windows()) {
|
||||
if (excluded_window->GetBoundsInScreen().Contains(screen_location)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void FocusCycler::RotateFocus(Direction direction, bool move_onto_next_widget) {
|
||||
Shell::Get()->mru_window_tracker()->BuildMruWindowList(kActiveDesk));
|
||||
if (mru_windows.empty())
|
||||
break;
|
||||
auto* window = mru_windows.front();
|
||||
auto* window = mru_windows.front().get();
|
||||
WindowState::Get(window)->Activate();
|
||||
views::Widget* widget = views::Widget::GetWidgetForNativeView(window);
|
||||
if (!widget)
|
||||
@ -121,7 +121,7 @@ bool FocusCycler::FocusWidget(views::Widget* widget) {
|
||||
|
||||
views::Widget* FocusCycler::FindWidget(
|
||||
base::RepeatingCallback<bool(views::Widget*)> callback) {
|
||||
for (auto* widget : widgets_) {
|
||||
for (views::Widget* widget : widgets_) {
|
||||
if (callback.Run(widget))
|
||||
return widget;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class ASH_EXPORT FocusCycler {
|
||||
base::RepeatingCallback<bool(views::Widget*)> callback);
|
||||
|
||||
private:
|
||||
std::vector<views::Widget*> widgets_;
|
||||
std::vector<raw_ptr<views::Widget, VectorExperimental>> widgets_;
|
||||
|
||||
// See description above getter.
|
||||
raw_ptr<views::Widget, ExperimentalAsh> widget_activating_;
|
||||
|
@ -39,7 +39,8 @@ class PanedWidgetDelegate : public views::WidgetDelegate {
|
||||
public:
|
||||
PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {}
|
||||
|
||||
void SetAccessiblePanes(const std::vector<views::View*>& panes) {
|
||||
void SetAccessiblePanes(
|
||||
const std::vector<raw_ptr<views::View, VectorExperimental>>& panes) {
|
||||
accessible_panes_ = panes;
|
||||
}
|
||||
|
||||
@ -52,7 +53,7 @@ class PanedWidgetDelegate : public views::WidgetDelegate {
|
||||
|
||||
private:
|
||||
raw_ptr<views::Widget, DanglingUntriaged | ExperimentalAsh> widget_;
|
||||
std::vector<views::View*> accessible_panes_;
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> accessible_panes_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
@ -317,7 +318,7 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
|
||||
view4->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
|
||||
pane2->AddChildView(view4);
|
||||
|
||||
std::vector<views::View*> panes;
|
||||
std::vector<raw_ptr<views::View, VectorExperimental>> panes;
|
||||
panes.push_back(pane1);
|
||||
panes.push_back(pane2);
|
||||
|
||||
|
@ -211,14 +211,14 @@ TEST_F(DefaultFrameHeaderTest, DeleteDuringAnimation) {
|
||||
wm::ActivateWindow(win0.get());
|
||||
|
||||
auto* frame_view = NonClientFrameViewAsh::Get(win0.get());
|
||||
auto* animating_layer_holding_view = frame_view->children()[0];
|
||||
auto* animating_layer_holding_view = frame_view->children()[0].get();
|
||||
EXPECT_TRUE(views::IsViewClass<chromeos::FrameHeader::FrameAnimatorView>(
|
||||
animating_layer_holding_view));
|
||||
ASSERT_TRUE(animating_layer_holding_view->layer());
|
||||
ASSERT_GT(animating_layer_holding_view->layer()->parent()->children().size(),
|
||||
2u);
|
||||
auto* animating_layer =
|
||||
animating_layer_holding_view->layer()->parent()->children()[0];
|
||||
animating_layer_holding_view->layer()->parent()->children()[0].get();
|
||||
EXPECT_EQ(ui::LAYER_TEXTURED, animating_layer->type());
|
||||
EXPECT_TRUE(base::Contains(animating_layer->name(), ":Old"));
|
||||
EXPECT_TRUE(animating_layer->GetAnimator()->is_animating());
|
||||
@ -246,7 +246,7 @@ TEST_F(DefaultFrameHeaderTest, ResizeAndReorderDuringAnimation) {
|
||||
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
|
||||
|
||||
auto* frame_view_0 = NonClientFrameViewAsh::Get(win_0.get());
|
||||
auto* animating_layer_holding_view_0 = frame_view_0->children()[0];
|
||||
auto* animating_layer_holding_view_0 = frame_view_0->children()[0].get();
|
||||
EXPECT_TRUE(views::IsViewClass<chromeos::FrameHeader::FrameAnimatorView>(
|
||||
animating_layer_holding_view_0));
|
||||
size_t original_layers_count_0 =
|
||||
@ -256,7 +256,7 @@ TEST_F(DefaultFrameHeaderTest, ResizeAndReorderDuringAnimation) {
|
||||
auto* extra_view_1 =
|
||||
frame_view_1->AddChildView(std::make_unique<views::View>());
|
||||
|
||||
auto* animating_layer_holding_view_1 = frame_view_1->children()[0];
|
||||
auto* animating_layer_holding_view_1 = frame_view_1->children()[0].get();
|
||||
EXPECT_TRUE(views::IsViewClass<chromeos::FrameHeader::FrameAnimatorView>(
|
||||
animating_layer_holding_view_1));
|
||||
size_t original_layers_count_1 =
|
||||
@ -270,7 +270,7 @@ TEST_F(DefaultFrameHeaderTest, ResizeAndReorderDuringAnimation) {
|
||||
animating_layer_holding_view_0->layer()->parent()->children().size(),
|
||||
original_layers_count_0 + 1);
|
||||
auto* animating_layer =
|
||||
animating_layer_holding_view_0->layer()->parent()->children()[0];
|
||||
animating_layer_holding_view_0->layer()->parent()->children()[0].get();
|
||||
EXPECT_TRUE(animating_layer->GetAnimator()->is_animating());
|
||||
|
||||
LayerDestroyedChecker checker(animating_layer);
|
||||
@ -290,7 +290,7 @@ TEST_F(DefaultFrameHeaderTest, ResizeAndReorderDuringAnimation) {
|
||||
animating_layer_holding_view_1->layer()->parent()->children().size(),
|
||||
original_layers_count_1 + 1);
|
||||
auto* animating_layer =
|
||||
animating_layer_holding_view_1->layer()->parent()->children()[0];
|
||||
animating_layer_holding_view_1->layer()->parent()->children()[0].get();
|
||||
EXPECT_TRUE(animating_layer->GetAnimator()->is_animating());
|
||||
LayerDestroyedChecker checker(animating_layer);
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "ash/wm/mru_window_tracker.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
@ -42,7 +43,7 @@ void CollectFrameSinkIds(const aura::Window* window,
|
||||
frame_sink_ids->insert(id);
|
||||
return;
|
||||
}
|
||||
for (auto* child : window->children()) {
|
||||
for (aura::Window* child : window->children()) {
|
||||
CollectFrameSinkIds(child, frame_sink_ids);
|
||||
}
|
||||
}
|
||||
@ -65,7 +66,7 @@ void CollectBrowserFrameSinkIdsInWindow(
|
||||
inside_browser = true;
|
||||
}
|
||||
|
||||
for (auto* child : window->children()) {
|
||||
for (aura::Window* child : window->children()) {
|
||||
CollectBrowserFrameSinkIdsInWindow(child, inside_browser, ids,
|
||||
frame_sink_ids);
|
||||
}
|
||||
@ -122,7 +123,7 @@ FrameThrottlingController::~FrameThrottlingController() {
|
||||
}
|
||||
|
||||
void FrameThrottlingController::StartThrottling(
|
||||
const std::vector<aura::Window*>& windows,
|
||||
const std::vector<raw_ptr<aura::Window, VectorExperimental>>& windows,
|
||||
base::TimeDelta requested_frame_interval) {
|
||||
latest_custom_throttled_frame_interval_ = requested_frame_interval;
|
||||
|
||||
@ -142,7 +143,7 @@ void FrameThrottlingController::StartThrottling(
|
||||
|
||||
std::vector<aura::Window*> arc_windows;
|
||||
arc_windows.reserve(windows.size());
|
||||
for (auto* window : windows) {
|
||||
for (aura::Window* window : windows) {
|
||||
ash::AppType type =
|
||||
static_cast<ash::AppType>(window->GetProperty(aura::client::kAppType));
|
||||
switch (type) {
|
||||
@ -361,7 +362,7 @@ void FrameThrottlingController::CollectLacrosWindowsInWindow(
|
||||
}
|
||||
}
|
||||
|
||||
for (auto* child : window->children()) {
|
||||
for (aura::Window* child : window->children()) {
|
||||
CollectLacrosWindowsInWindow(child, inside_lacros, ids, candidates,
|
||||
lacros_window);
|
||||
}
|
||||
@ -379,8 +380,9 @@ void FrameThrottlingController::CollectLacrosCandidates(
|
||||
lacros_window->AddObserver(this);
|
||||
return;
|
||||
}
|
||||
for (auto* child : window->children())
|
||||
for (aura::Window* child : window->children()) {
|
||||
CollectLacrosCandidates(child, candidates, lacros_window);
|
||||
}
|
||||
}
|
||||
|
||||
bool FrameThrottlingController::HasCompositingBasedThrottling() const {
|
||||
|
@ -103,7 +103,7 @@ class ASH_EXPORT FrameThrottlingController final
|
||||
// If the |requested_frame_interval| is zero, the default throttled frame rate
|
||||
// is used internally.
|
||||
void StartThrottling(
|
||||
const std::vector<aura::Window*>& windows,
|
||||
const std::vector<raw_ptr<aura::Window, VectorExperimental>>& windows,
|
||||
base::TimeDelta requested_frame_interval = base::TimeDelta());
|
||||
|
||||
// Ends throttling of all windows specified via StartThrottling(). The
|
||||
|
@ -195,10 +195,12 @@ void GameDashboardController::GetWindowGameState(aura::Window* window) {
|
||||
} else if (IsArcWindow(window)) {
|
||||
// For ARC apps, the "app_id" is equivalent to its package name.
|
||||
delegate_->GetIsGame(
|
||||
*app_id, base::BindOnce(&GameDashboardController::OnArcWindowIsGame,
|
||||
weak_ptr_factory_.GetWeakPtr(),
|
||||
std::make_unique<aura::WindowTracker>(
|
||||
std::vector<aura::Window*>({window}))));
|
||||
*app_id, base::BindOnce(
|
||||
&GameDashboardController::OnArcWindowIsGame,
|
||||
weak_ptr_factory_.GetWeakPtr(),
|
||||
std::make_unique<aura::WindowTracker>(
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>>(
|
||||
{window}))));
|
||||
} else {
|
||||
RefreshWindowTracking(window, (*app_id == extension_misc::kGeForceNowAppId)
|
||||
? WindowGameState::kGame
|
||||
|
@ -246,7 +246,8 @@ TEST_F(GlanceablesTasksViewTest,
|
||||
TEST_F(GlanceablesTasksViewTest, DoesNotAllowEditingToBlankTitle) {
|
||||
tasks_client()->set_paused(true);
|
||||
|
||||
const auto* const task_view = GetTaskItemsContainerView()->children()[0];
|
||||
const auto* const task_view =
|
||||
GetTaskItemsContainerView()->children()[0].get();
|
||||
|
||||
{
|
||||
const auto* const title_label =
|
||||
|
@ -82,15 +82,17 @@ AshWindowTreeHostUnified::AshWindowTreeHostUnified(
|
||||
}
|
||||
|
||||
AshWindowTreeHostUnified::~AshWindowTreeHostUnified() {
|
||||
for (auto* ash_host : mirroring_hosts_)
|
||||
for (ash::AshWindowTreeHost* ash_host : mirroring_hosts_) {
|
||||
ash_host->AsWindowTreeHost()->window()->RemoveObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
void AshWindowTreeHostUnified::PrepareForShutdown() {
|
||||
AshWindowTreeHostPlatform::PrepareForShutdown();
|
||||
|
||||
for (auto* host : mirroring_hosts_)
|
||||
for (ash::AshWindowTreeHost* host : mirroring_hosts_) {
|
||||
host->PrepareForShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
void AshWindowTreeHostUnified::RegisterMirroringHost(
|
||||
@ -109,18 +111,21 @@ void AshWindowTreeHostUnified::RegisterMirroringHost(
|
||||
void AshWindowTreeHostUnified::UpdateCursorConfig() {}
|
||||
|
||||
void AshWindowTreeHostUnified::ClearCursorConfig() {
|
||||
for (auto* host : mirroring_hosts_)
|
||||
for (ash::AshWindowTreeHost* host : mirroring_hosts_) {
|
||||
host->ClearCursorConfig();
|
||||
}
|
||||
}
|
||||
|
||||
void AshWindowTreeHostUnified::SetCursorNative(gfx::NativeCursor cursor) {
|
||||
for (auto* host : mirroring_hosts_)
|
||||
for (ash::AshWindowTreeHost* host : mirroring_hosts_) {
|
||||
host->AsWindowTreeHost()->SetCursor(cursor);
|
||||
}
|
||||
}
|
||||
|
||||
void AshWindowTreeHostUnified::OnCursorVisibilityChangedNative(bool show) {
|
||||
for (auto* host : mirroring_hosts_)
|
||||
for (ash::AshWindowTreeHost* host : mirroring_hosts_) {
|
||||
host->AsWindowTreeHost()->OnCursorVisibilityChanged(show);
|
||||
}
|
||||
}
|
||||
|
||||
void AshWindowTreeHostUnified::OnBoundsChanged(const BoundsChange& change) {
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ash/host/ash_window_tree_host_platform.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "ui/aura/window_observer.h"
|
||||
|
||||
namespace ash {
|
||||
@ -46,7 +47,7 @@ class AshWindowTreeHostUnified : public AshWindowTreeHostPlatform,
|
||||
// aura::WindowObserver:
|
||||
void OnWindowDestroying(aura::Window* window) override;
|
||||
|
||||
std::vector<AshWindowTreeHost*> mirroring_hosts_;
|
||||
std::vector<raw_ptr<AshWindowTreeHost, VectorExperimental>> mirroring_hosts_;
|
||||
};
|
||||
|
||||
} // namespace ash
|
||||
|
@ -89,7 +89,7 @@ void GraphsContainerView::UpdateData(
|
||||
: 1;
|
||||
data_update_count_ += intervals;
|
||||
|
||||
for (auto* child : children()) {
|
||||
for (views::View* child : children()) {
|
||||
// Insert missing points.
|
||||
for (unsigned j = 0; j < intervals; ++j)
|
||||
static_cast<GraphPageViewBase*>(child)->UpdateData(*snapshot);
|
||||
@ -117,8 +117,9 @@ void GraphsContainerView::SetMode(HUDDisplayMode mode) {
|
||||
DCHECK(selected);
|
||||
return;
|
||||
}
|
||||
for (auto* child : children())
|
||||
for (views::View* child : children()) {
|
||||
child->SetVisible(false);
|
||||
}
|
||||
|
||||
selected->SetVisible(true);
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ void HUDHeaderLayout::Layout(views::View* host) {
|
||||
|
||||
const gfx::Size preferred_size = data_view_->GetPreferredSize();
|
||||
|
||||
for (auto* child : host->children()) {
|
||||
for (views::View* child : host->children()) {
|
||||
if (child != padding_) {
|
||||
child->SetPosition({0, 0});
|
||||
child->SetSize(preferred_size);
|
||||
|
@ -112,7 +112,7 @@ base::RepeatingCallback<void(views::Checkbox*)> GetCCDebugUpdateStateCallback(
|
||||
views::Checkbox* checkbox) {
|
||||
bool is_enabled = false;
|
||||
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
ui::Compositor* compositor = window->GetHost()->compositor();
|
||||
is_enabled |= compositor->GetLayerTreeDebugState().*field;
|
||||
}
|
||||
@ -126,7 +126,7 @@ base::RepeatingCallback<void(views::Checkbox*)> GetCCDebugHandleClickCallback(
|
||||
return base::BindRepeating(
|
||||
[](bool cc::LayerTreeDebugState::*field, views::Checkbox* checkbox) {
|
||||
aura::Window::Windows root_windows = Shell::Get()->GetAllRootWindows();
|
||||
for (auto* window : root_windows) {
|
||||
for (aura::Window* window : root_windows) {
|
||||
ui::Compositor* compositor = window->GetHost()->compositor();
|
||||
cc::LayerTreeDebugState state = compositor->GetLayerTreeDebugState();
|
||||
state.*field = checkbox->GetChecked();
|
||||
@ -341,11 +341,13 @@ void AnimationSpeedControl::SliderValueChanged(
|
||||
void AnimationSpeedControl::Layout() {
|
||||
gfx::Size max_size;
|
||||
// Make all labels equal size.
|
||||
for (const auto* label : hints_container_->children())
|
||||
for (const views::View* label : hints_container_->children()) {
|
||||
max_size.SetToMax(label->GetPreferredSize());
|
||||
}
|
||||
|
||||
for (auto* label : hints_container_->children())
|
||||
for (views::View* label : hints_container_->children()) {
|
||||
label->SetPreferredSize(max_size);
|
||||
}
|
||||
|
||||
gfx::Size hints_total_size = hints_container_->GetPreferredSize();
|
||||
// Slider should begin in the middle of the first label, and end in the
|
||||
|
@ -182,7 +182,7 @@ void Legend::Layout() {
|
||||
|
||||
gfx::Size max_size;
|
||||
bool updated = false;
|
||||
for (auto* view : children()) {
|
||||
for (views::View* view : children()) {
|
||||
if (std::string_view(view->GetClassName()) !=
|
||||
std::string_view(LegendEntry::kViewClassName)) {
|
||||
continue;
|
||||
@ -193,7 +193,7 @@ void Legend::Layout() {
|
||||
updated |= max_size != value->GetPreferredSize();
|
||||
}
|
||||
if (updated) {
|
||||
for (auto* view : children()) {
|
||||
for (views::View* view : children()) {
|
||||
if (std::string_view(view->GetClassName()) !=
|
||||
std::string_view(LegendEntry::kViewClassName)) {
|
||||
continue;
|
||||
@ -206,7 +206,7 @@ void Legend::Layout() {
|
||||
}
|
||||
|
||||
void Legend::SetValuesIndex(size_t index) {
|
||||
for (auto* view : children()) {
|
||||
for (views::View* view : children()) {
|
||||
if (std::string_view(view->GetClassName()) !=
|
||||
std::string_view(LegendEntry::kViewClassName)) {
|
||||
continue;
|
||||
@ -217,7 +217,7 @@ void Legend::SetValuesIndex(size_t index) {
|
||||
}
|
||||
|
||||
void Legend::RefreshValues() {
|
||||
for (auto* view : children()) {
|
||||
for (views::View* view : children()) {
|
||||
if (std::string_view(view->GetClassName()) !=
|
||||
std::string_view(LegendEntry::kViewClassName)) {
|
||||
continue;
|
||||
|
@ -42,7 +42,7 @@ class HUDTabStripLayout : public views::LayoutManager {
|
||||
|
||||
gfx::Size HUDTabStripLayout::GetPreferredSize(const views::View* host) const {
|
||||
gfx::Size result;
|
||||
for (const auto* child : host->children()) {
|
||||
for (const views::View* child : host->children()) {
|
||||
const gfx::Size child_preferred = child->GetPreferredSize();
|
||||
// Tab strip is always horizontal.
|
||||
result.set_width(result.width() + child_preferred.width() -
|
||||
@ -63,7 +63,7 @@ void HUDTabStripLayout::Layout(views::View* host) {
|
||||
// Assume all children have equal left and right border, which is used to
|
||||
// overlay the tabs.
|
||||
int left_offset = 0;
|
||||
for (auto* child : host->children()) {
|
||||
for (views::View* child : host->children()) {
|
||||
const gfx::Size preferred = child->GetPreferredSize();
|
||||
const gfx::Size child_size({preferred.width(), host->height()});
|
||||
child->SetSize(child_size);
|
||||
@ -181,7 +181,7 @@ HUDTabButton* HUDTabStrip::AddTabButton(const HUDDisplayMode display_mode,
|
||||
display_mode, label));
|
||||
tab_button->SetCallback(base::BindRepeating(
|
||||
[](HUDTabButton* sender, HUDTabStrip* tab_strip) {
|
||||
for (const auto* tab : tab_strip->tabs_) {
|
||||
for (const ash::hud_display::HUDTabButton* tab : tab_strip->tabs_) {
|
||||
if (tab == sender) {
|
||||
tab_strip->hud_->SetDisplayMode(tab->display_mode());
|
||||
return;
|
||||
|
@ -80,7 +80,8 @@ class HUDTabStrip : public views::View {
|
||||
|
||||
private:
|
||||
raw_ptr<HUDDisplayView, ExperimentalAsh> hud_;
|
||||
std::vector<HUDTabButton*> tabs_; // Ordered list of child tabs.
|
||||
std::vector<raw_ptr<HUDTabButton, VectorExperimental>>
|
||||
tabs_; // Ordered list of child tabs.
|
||||
};
|
||||
|
||||
} // namespace hud_display
|
||||
|
@ -325,7 +325,7 @@ void FixedLengthCodeInput::Backspace() {
|
||||
std::optional<std::string> FixedLengthCodeInput::GetCode() const {
|
||||
std::string result;
|
||||
size_t length;
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
length = field->GetText().length();
|
||||
if (!length) {
|
||||
return std::nullopt;
|
||||
@ -343,7 +343,7 @@ void FixedLengthCodeInput::SetInputColorId(ui::ColorId color_id) {
|
||||
? static_cast<ui::ColorId>(cros_tokens::kCrosSysError)
|
||||
: kColorAshTextColorAlert;
|
||||
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
field->SetTextColorId(color_id);
|
||||
// We don't update the underline color to red.
|
||||
if (color_id != error_color_id) {
|
||||
@ -528,7 +528,7 @@ bool FixedLengthCodeInput::HandleGestureEvent(
|
||||
}
|
||||
|
||||
void FixedLengthCodeInput::SetInputEnabled(bool input_enabled) {
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
field->SetEnabled(input_enabled);
|
||||
}
|
||||
}
|
||||
@ -538,7 +538,7 @@ void FixedLengthCodeInput::SetReadOnly(bool read_only) {
|
||||
const ui::ColorId underline_color_id =
|
||||
is_jelly ? static_cast<ui::ColorId>(cros_tokens::kCrosSysOnSurface)
|
||||
: kColorAshTextColorPrimary;
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
field->SetReadOnly(read_only);
|
||||
field->SetBackground(nullptr);
|
||||
field->SetBorder(views::CreateThemedSolidSidedBorder(
|
||||
@ -560,7 +560,7 @@ bool FixedLengthCodeInput::IsReadOnly() const {
|
||||
}
|
||||
|
||||
void FixedLengthCodeInput::ClearInput() {
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
field->SetText(std::u16string());
|
||||
}
|
||||
active_input_index_ = 0;
|
||||
@ -569,7 +569,7 @@ void FixedLengthCodeInput::ClearInput() {
|
||||
}
|
||||
|
||||
bool FixedLengthCodeInput::IsEmpty() const {
|
||||
for (auto* field : input_fields_) {
|
||||
for (ash::AccessibleInputField* field : input_fields_) {
|
||||
if (field->GetText().length()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ class FixedLengthCodeInput : public AccessCodeInput {
|
||||
int active_input_index_ = 0;
|
||||
|
||||
// Unowned input textfields ordered from the first to the last digit.
|
||||
std::vector<AccessibleInputField*> input_fields_;
|
||||
std::vector<raw_ptr<AccessibleInputField, VectorExperimental>> input_fields_;
|
||||
|
||||
// Value of current input, associate with AX event. The value will be the
|
||||
// concat string of input fields. i.e. [1][2][3][|][][], text_value_for_a11y_
|
||||
|
@ -2480,7 +2480,7 @@ bool LockContentsView::GetSystemInfoVisibility() const {
|
||||
}
|
||||
|
||||
void LockContentsView::UpdateSystemInfoColors() {
|
||||
for (auto* child : system_info_->children()) {
|
||||
for (views::View* child : system_info_->children()) {
|
||||
views::Label* label = static_cast<views::Label*>(child);
|
||||
label->SetEnabledColorId(kColorAshTextColorPrimary);
|
||||
}
|
||||
|
@ -2768,7 +2768,7 @@ TEST_F(LockContentsViewUnitTest, LoginNotReactingOnEventsWithOobeDialogShown) {
|
||||
|
||||
LockContentsViewTestApi lock_contents(contents);
|
||||
ScrollableUsersListView::TestApi users_list(lock_contents.users_list());
|
||||
const auto* const list_user_view = users_list.user_views()[0];
|
||||
const auto* const list_user_view = users_list.user_views()[0].get();
|
||||
LoginBigUserView* auth_view = lock_contents.primary_big_view();
|
||||
|
||||
AccountId auth_view_user =
|
||||
@ -3148,7 +3148,7 @@ TEST_F(LockContentsViewUnitTest,
|
||||
|
||||
LockContentsViewTestApi lock_contents(contents);
|
||||
ScrollableUsersListView::TestApi users_list(lock_contents.users_list());
|
||||
const auto* const list_user_view = users_list.user_views()[0];
|
||||
const auto* const list_user_view = users_list.user_views()[0].get();
|
||||
LoginBigUserView* auth_view = lock_contents.primary_big_view();
|
||||
|
||||
AccountId auth_view_user =
|
||||
|
@ -397,7 +397,7 @@ LockScreenMediaControlsView::LockScreenMediaControlsView(
|
||||
this, kPlayPauseIconSize, MediaSessionAction::kPause,
|
||||
l10n_util::GetStringUTF16(
|
||||
IDS_ASH_LOCK_SCREEN_MEDIA_CONTROLS_ACTION_PAUSE)));
|
||||
media_action_buttons_.push_back(play_pause_button_);
|
||||
media_action_buttons_.push_back(play_pause_button_.get());
|
||||
|
||||
media_action_buttons_.push_back(
|
||||
right_control_group->AddChildView(std::make_unique<MediaActionButton>(
|
||||
|
@ -244,7 +244,7 @@ class ASH_EXPORT LockScreenMediaControlsView
|
||||
raw_ptr<media_message_center::MediaControlsProgressView, ExperimentalAsh>
|
||||
progress_ = nullptr;
|
||||
|
||||
std::vector<views::Button*> media_action_buttons_;
|
||||
std::vector<raw_ptr<views::Button, VectorExperimental>> media_action_buttons_;
|
||||
|
||||
// Callbacks.
|
||||
const MediaControlsEnabled media_controls_enabled_;
|
||||
|
@ -256,7 +256,8 @@ class LockScreenMediaControlsViewTest : public LoginTestBase {
|
||||
return header_row()->close_button_for_testing();
|
||||
}
|
||||
|
||||
std::vector<views::Button*>& media_action_buttons() const {
|
||||
std::vector<raw_ptr<views::Button, VectorExperimental>>&
|
||||
media_action_buttons() const {
|
||||
return media_controls_view_->media_action_buttons_;
|
||||
}
|
||||
|
||||
@ -380,7 +381,7 @@ TEST_F(LockScreenMediaControlsViewTest, ButtonsSanityCheck) {
|
||||
EXPECT_EQ(5u, media_action_buttons().size());
|
||||
|
||||
for (int i = 0; i < 5; /* size of |button_row| */ i++) {
|
||||
auto* child = media_action_buttons()[i];
|
||||
auto* child = media_action_buttons()[i].get();
|
||||
|
||||
ASSERT_TRUE(IsMediaButtonType(child));
|
||||
|
||||
|
@ -157,7 +157,7 @@ class LoginAuthFactorsViewUnittest : public LoginTestBase {
|
||||
size_t GetVisibleIconCount() {
|
||||
LoginAuthFactorsView::TestApi test_api(view_);
|
||||
size_t count = 0;
|
||||
for (auto* icon : test_api.auth_factor_icon_row()->children()) {
|
||||
for (views::View* icon : test_api.auth_factor_icon_row()->children()) {
|
||||
if (icon->GetVisible()) {
|
||||
count++;
|
||||
}
|
||||
@ -213,14 +213,14 @@ class LoginAuthFactorsViewUnittest : public LoginTestBase {
|
||||
raw_ptr<views::View, ExperimentalAsh> container_ = nullptr;
|
||||
raw_ptr<LoginAuthFactorsView, ExperimentalAsh> view_ =
|
||||
nullptr; // Owned by container.
|
||||
std::vector<FakeAuthFactorModel*> auth_factors_;
|
||||
std::vector<raw_ptr<FakeAuthFactorModel, VectorExperimental>> auth_factors_;
|
||||
bool click_to_enter_called_ = false;
|
||||
bool auth_factor_is_hiding_password_ = false;
|
||||
};
|
||||
|
||||
TEST_F(LoginAuthFactorsViewUnittest, TapOrClickCalled) {
|
||||
AddAuthFactors({AuthFactorType::kFingerprint, AuthFactorType::kSmartLock});
|
||||
auto* factor = auth_factors_[0];
|
||||
auto* factor = auth_factors_[0].get();
|
||||
|
||||
// RefreshUI() calls UpdateIcon(), which captures a pointer to the
|
||||
// icon.
|
||||
@ -238,11 +238,11 @@ TEST_F(LoginAuthFactorsViewUnittest, ShouldAnnounceLabel) {
|
||||
LoginAuthFactorsView::TestApi test_api(view_);
|
||||
views::Label* label = test_api.label();
|
||||
ScopedAXEventObserver alert_observer(label, ax::mojom::Event::kAlert);
|
||||
for (auto* factor : auth_factors_) {
|
||||
for (FakeAuthFactorModel* factor : auth_factors_) {
|
||||
factor->state_ = AuthFactorState::kAvailable;
|
||||
}
|
||||
|
||||
auto* factor = auth_factors_[0];
|
||||
auto* factor = auth_factors_[0].get();
|
||||
ASSERT_FALSE(factor->ShouldAnnounceLabel());
|
||||
ASSERT_FALSE(alert_observer.event_called);
|
||||
|
||||
@ -489,7 +489,7 @@ TEST_F(LoginAuthFactorsViewUnittest, ErrorPermanent) {
|
||||
auth_factors_[0]->state_ = AuthFactorState::kErrorPermanent;
|
||||
auth_factors_[1]->state_ = AuthFactorState::kReady;
|
||||
test_api.UpdateState();
|
||||
auto* factor = auth_factors_[0];
|
||||
auto* factor = auth_factors_[0].get();
|
||||
|
||||
EXPECT_TRUE(test_api.auth_factor_icon_row()->GetVisible());
|
||||
EXPECT_FALSE(test_api.checkmark_icon()->GetVisible());
|
||||
|
@ -204,7 +204,7 @@ TEST_P(LoginExpandedPublicAccountViewTest, ShowLearnMoreDialog) {
|
||||
|
||||
// Tap on the learn more link.
|
||||
const auto& children = test_api.learn_more_label()->children();
|
||||
const auto it = base::ranges::find_if(children, [](auto* child) {
|
||||
const auto it = base::ranges::find_if(children, [](views::View* child) {
|
||||
return views::IsViewClass<views::LinkFragment>(child);
|
||||
});
|
||||
DCHECK(it != children.cend());
|
||||
|
@ -127,8 +127,8 @@ class ASH_EXPORT LoginPinView : public NonAccessibleView {
|
||||
// The submit button does not exist when no |on_submit| callback is passed.
|
||||
raw_ptr<SubmitPinButton, ExperimentalAsh> submit_button_ = nullptr;
|
||||
|
||||
std::vector<NonAccessibleView*> rows_;
|
||||
std::vector<DigitPinButton*> digit_buttons_;
|
||||
std::vector<raw_ptr<NonAccessibleView, VectorExperimental>> rows_;
|
||||
std::vector<raw_ptr<DigitPinButton, VectorExperimental>> digit_buttons_;
|
||||
};
|
||||
|
||||
} // namespace ash
|
||||
|
@ -89,7 +89,7 @@ LoginUserInfo CreatePublicAccountUser(const std::string& email) {
|
||||
|
||||
bool HasFocusInAnyChildView(const views::View* view) {
|
||||
return view->HasFocus() ||
|
||||
base::ranges::any_of(view->children(), [](const auto* v) {
|
||||
base::ranges::any_of(view->children(), [](const views::View* v) {
|
||||
return HasFocusInAnyChildView(v);
|
||||
});
|
||||
}
|
||||
@ -116,7 +116,7 @@ bool TabThroughView(ui::test::EventGenerator* event_generator,
|
||||
// Performs a DFS for the first button in the views hierarchy
|
||||
// The last child is on the top of the z layer stack
|
||||
views::View* FindTopButton(views::View* current_view) {
|
||||
for (auto* child : base::Reversed(current_view->children())) {
|
||||
for (views::View* child : base::Reversed(current_view->children())) {
|
||||
if (views::Button::AsButton(child)) {
|
||||
return child;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ class EnterpriseBadgeLayout : public views::LayoutManager {
|
||||
DCHECK_EQ(host->children().size(), 1U);
|
||||
const gfx::Rect content_bounds(host->GetContentsBounds());
|
||||
const int offset = content_bounds.width() - size_;
|
||||
auto* child = host->children()[0];
|
||||
auto* child = host->children()[0].get();
|
||||
child->SetPosition({offset, offset});
|
||||
child->SetSize({size_, size_});
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ash/wallpaper/wallpaper_controller_impl.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "cc/paint/paint_flags.h"
|
||||
#include "cc/paint/paint_shader.h"
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
@ -169,7 +170,7 @@ ScrollableUsersListView::TestApi::TestApi(ScrollableUsersListView* view)
|
||||
|
||||
ScrollableUsersListView::TestApi::~TestApi() = default;
|
||||
|
||||
const std::vector<LoginUserView*>&
|
||||
const std::vector<raw_ptr<LoginUserView, VectorExperimental>>&
|
||||
ScrollableUsersListView::TestApi::user_views() const {
|
||||
return view_->user_views_;
|
||||
}
|
||||
@ -234,7 +235,7 @@ ScrollableUsersListView::~ScrollableUsersListView() = default;
|
||||
|
||||
LoginUserView* ScrollableUsersListView::GetUserView(
|
||||
const AccountId& account_id) {
|
||||
for (auto* view : user_views_) {
|
||||
for (ash::LoginUserView* view : user_views_) {
|
||||
if (view->current_user().basic_user_info.account_id == account_id) {
|
||||
return view;
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ class ASH_EXPORT ScrollableUsersListView : public views::ScrollView,
|
||||
explicit TestApi(ScrollableUsersListView* view);
|
||||
~TestApi();
|
||||
|
||||
const std::vector<LoginUserView*>& user_views() const;
|
||||
const std::vector<raw_ptr<LoginUserView, VectorExperimental>>& user_views()
|
||||
const;
|
||||
|
||||
private:
|
||||
const raw_ptr<ScrollableUsersListView, ExperimentalAsh> view_;
|
||||
@ -106,7 +107,7 @@ class ASH_EXPORT ScrollableUsersListView : public views::ScrollView,
|
||||
// Layout for |user_view_host_|.
|
||||
raw_ptr<views::BoxLayout, ExperimentalAsh> user_view_host_layout_ = nullptr;
|
||||
|
||||
std::vector<LoginUserView*> user_views_;
|
||||
std::vector<raw_ptr<LoginUserView, VectorExperimental>> user_views_;
|
||||
|
||||
GradientParams gradient_params_;
|
||||
|
||||
|
@ -177,7 +177,7 @@ views::View* GetBubbleContainer(views::View* view) {
|
||||
// An arbitrary id that no other child of root view should use.
|
||||
const int kMenuContainerId = 1000;
|
||||
views::View* container = nullptr;
|
||||
for (auto* child : root_view->children()) {
|
||||
for (views::View* child : root_view->children()) {
|
||||
if (child->GetID() == kMenuContainerId) {
|
||||
container = child;
|
||||
break;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "ash/wm/window_positioner.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "ui/aura/client/aura_constants.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
@ -74,7 +75,8 @@ class MaximizedWindowAnimationWatcher : public ui::ImplicitAnimationObserver {
|
||||
|
||||
// Modifies the given |window_list| such that the most-recently used window (if
|
||||
// any, and if it exists in |window_list|) will be the last window in the list.
|
||||
void PutMruWindowLast(std::vector<aura::Window*>* window_list) {
|
||||
void PutMruWindowLast(
|
||||
std::vector<raw_ptr<aura::Window, VectorExperimental>>* window_list) {
|
||||
DCHECK(window_list);
|
||||
auto it = base::ranges::find_if(*window_list, &wm::IsActiveWindow);
|
||||
if (it == window_list->end())
|
||||
@ -228,7 +230,7 @@ void UserSwitchAnimator::TransitionWindows(AnimationStep animation_step) {
|
||||
// activateable window to restore focus to, and so we don't change
|
||||
// window order (crbug.com/424307).
|
||||
PutMruWindowLast(&(user_pair.second));
|
||||
for (auto* window : user_pair.second) {
|
||||
for (aura::Window* window : user_pair.second) {
|
||||
// Minimized visiting windows (minimized windows with an owner
|
||||
// different than that of the for_show_account_id) should return to
|
||||
// their
|
||||
@ -282,7 +284,7 @@ void UserSwitchAnimator::TransitionWindows(AnimationStep animation_step) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto* window : new_user_itr->second) {
|
||||
for (aura::Window* window : new_user_itr->second) {
|
||||
auto entry = owner_->window_to_entry().find(window);
|
||||
DCHECK(entry != owner_->window_to_entry().end());
|
||||
|
||||
@ -364,7 +366,7 @@ void UserSwitchAnimator::BuildUserToWindowsListMap() {
|
||||
aura::Window* parent_window = window_entry_pair.first->parent();
|
||||
if (!base::Contains(parent_windows, parent_window)) {
|
||||
parent_windows.insert(parent_window);
|
||||
for (auto* child_window : parent_window->children()) {
|
||||
for (aura::Window* child_window : parent_window->children()) {
|
||||
auto itr = window_to_entry_map.find(child_window);
|
||||
if (itr != window_to_entry_map.end()) {
|
||||
windows_by_account_id_[itr->second->show_for_user()].push_back(
|
||||
|
@ -15,6 +15,7 @@ namespace {
|
||||
using ::testing::AllOf;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::IsEmpty;
|
||||
using ::testing::Pointee;
|
||||
using ::testing::Property;
|
||||
|
||||
using PickerContentsViewTest = AshTestBase;
|
||||
@ -36,8 +37,9 @@ TEST_F(PickerContentsViewTest, AddPageCreatesHiddenChildren) {
|
||||
|
||||
EXPECT_THAT(
|
||||
view->children(),
|
||||
ElementsAre(AllOf(page1, Property(&views::View::GetVisible, false)),
|
||||
AllOf(page2, Property(&views::View::GetVisible, false))));
|
||||
ElementsAre(
|
||||
AllOf(page1, Pointee(Property(&views::View::GetVisible, false))),
|
||||
AllOf(page2, Pointee(Property(&views::View::GetVisible, false)))));
|
||||
}
|
||||
|
||||
TEST_F(PickerContentsViewTest, SetActivePageChangesVisibility) {
|
||||
@ -50,15 +52,17 @@ TEST_F(PickerContentsViewTest, SetActivePageChangesVisibility) {
|
||||
|
||||
EXPECT_THAT(
|
||||
view->children(),
|
||||
ElementsAre(AllOf(page1, Property(&views::View::GetVisible, true)),
|
||||
AllOf(page2, Property(&views::View::GetVisible, false))));
|
||||
ElementsAre(
|
||||
AllOf(page1, Pointee(Property(&views::View::GetVisible, true))),
|
||||
AllOf(page2, Pointee(Property(&views::View::GetVisible, false)))));
|
||||
|
||||
view->SetActivePage(page2);
|
||||
|
||||
EXPECT_THAT(
|
||||
view->children(),
|
||||
ElementsAre(AllOf(page1, Property(&views::View::GetVisible, false)),
|
||||
AllOf(page2, Property(&views::View::GetVisible, true))));
|
||||
ElementsAre(
|
||||
AllOf(page1, Pointee(Property(&views::View::GetVisible, false))),
|
||||
AllOf(page2, Pointee(Property(&views::View::GetVisible, true)))));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "ash/ash_export.h"
|
||||
#include "ash/public/cpp/app_list/app_list_types.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
|
||||
namespace aura {
|
||||
class Window;
|
||||
@ -19,7 +20,8 @@ class Window;
|
||||
namespace ash {
|
||||
|
||||
// Get application windows, windows that are shown in overview grid.
|
||||
ASH_EXPORT std::vector<aura::Window*> GetAppWindowList();
|
||||
ASH_EXPORT std::vector<raw_ptr<aura::Window, VectorExperimental>>
|
||||
GetAppWindowList();
|
||||
|
||||
// Runs the callback when the launcher state becomes |state| after
|
||||
// state transition animation. For clamshell launcher, it invokes closure
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ash/ash_export.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
|
||||
namespace aura {
|
||||
class Window;
|
||||
@ -25,11 +26,11 @@ namespace debug {
|
||||
class ASH_EXPORT DebugWindowHierarchyDelegate {
|
||||
public:
|
||||
virtual ~DebugWindowHierarchyDelegate() = default;
|
||||
virtual std::vector<aura::Window*> GetAdjustedWindowChildren(
|
||||
aura::Window* window) const = 0;
|
||||
virtual std::vector<raw_ptr<aura::Window, VectorExperimental>>
|
||||
GetAdjustedWindowChildren(aura::Window* window) const = 0;
|
||||
|
||||
virtual std::vector<ui::Layer*> GetAdjustedLayerChildren(
|
||||
const ui::Layer* layer) const = 0;
|
||||
virtual std::vector<raw_ptr<ui::Layer, VectorExperimental>>
|
||||
GetAdjustedLayerChildren(const ui::Layer* layer) const = 0;
|
||||
};
|
||||
|
||||
ASH_EXPORT void SetDebugWindowHierarchyDelegate(
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user